Closed
Bug 622491
Opened 14 years ago
Closed 13 years ago
Enable global scope polluter in standards mode
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla14
People
(Reporter: mdykun, Assigned: bzbarsky)
References
()
Details
Attachments
(1 file)
(deleted),
patch
|
jst
:
review+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:2.0b9pre) Gecko/20110102 Firefox/4.0b9pre
Build Identifier:
When added one file, should appear automatically form for uploading another one. It works on all browsers except FF
Reproducible: Always
Steps to Reproduce:
1. go to desuchan.ru/aa
2. choose file in form for uploading
3. that's all. New form does not appear
Actual Results:
New form does not appear
Expected Results:
You should see a new file upload form
Comment 1•14 years ago
|
||
Is it OK to upload random files for testing purposes?
(In reply to comment #1)
> Is it OK to upload random files for testing purposes?
yes, it's OK, but the form designed for images
Assignee | ||
Comment 3•14 years ago
|
||
David, you don't have to upload anything to reproduce. The new file control is supposed to appear as soon as you select a file in the existing file control.
Assignee | ||
Comment 4•14 years ago
|
||
The relevant JS error is likely this:
Error: file_2_div is not defined
Source File: http://desuchan.ru:800/aa/wakaba.html
Line: 1
Line 1 is useless; all the text on the page is on one line.
The relevant markup (somewhat reduced) looks like this:
<form>
<table>
<tbody>
<tr>
<td>
<div id="file_1_div">
<input type="file" onchange="more_files(file_2_div);">
</div>
<div id="file_2_div" style="display:none">
<input type="file" name="file_2" size="35">
</div>
</td>
</tr>
</tbody>
</table>
</form>
Note the bareword "file_2_div" in that event handler. In quirks mode, we map bareword lookups on the global object to id lookups and the like. In standards mode, which is what the page is in, we don't do that. If I switch the page into quirks mode, everything works.
It looks to me like http://www.whatwg.org/specs/web-apps/current-work/multipage/browsers.html#dom-window-nameditem requires the behavior in all modes, though this part of the spec is not final and I think we should push back on having this global scope pollution in standards mode....
In any case, either using quirks mode or using getElementById if that's what you actually mean will make the page work without relying on non-standard browser behavior.
Assignee: general → nobody
Status: UNCONFIRMED → NEW
Component: JavaScript Engine → DOM
Ever confirmed: true
QA Contact: general → general
Summary: Next form for adding file not appear on desuchan.ru/aa → Should we have a global scope polluter in standards mode?
Comment 5•14 years ago
|
||
(In reply to comment #4)
> non-standard browser behavior.
That's a bit of a stretch now ;)
However, I would like it as well if we could avoid putting this horrible mess in standards mode.
For reference:
Oct 07 20:34:21 <Ms2ger> Also, what's the cabal's opinion on making the named access on window quirks-only?
Oct 07 20:34:41 <gsnedders> I would be amazed if that didn't break a large number of sites.
Oct 07 20:35:01 <Workshiva> Large may not be large enough
Oct 07 20:35:08 <Ms2ger> Gecko doesn't have it in standards mode
Oct 07 20:35:35 <gsnedders> Ms2ger: Oh. That surprises me. Oh well.
Updated•13 years ago
|
OS: Windows 7 → All
Hardware: x86 → All
Version: unspecified → Trunk
Assignee | ||
Comment 8•13 years ago
|
||
I give up. WebKit and IE are never going to change this, Ian is never going to change the spec, and sites are actually starting to depend on this now.
Attachment #607869 -
Flags: review?(jst)
Assignee | ||
Updated•13 years ago
|
Assignee: nobody → bzbarsky
Whiteboard: [need review]
Comment 9•13 years ago
|
||
(In reply to Boris Zbarsky (:bz) from comment #8)
> I give up. WebKit and IE are never going to change this, Ian is never going
> to change the spec, and sites are actually starting to depend on this now.
How about educating web masters of said sites if known?
Wouldn't that be better than caving in because the other two players are doing it wrong?
I don't even know what "Ian spec" you're referring to here, so please "take this with many grains of salt" =)
Assignee | ||
Comment 10•13 years ago
|
||
> How about educating web masters of said sites if known?
Have fun with that. Start with Microsoft (see bug 737760). And they'll just tell you that the code is perfectly per spec, which at the moment it is.
> Wouldn't that be better than caving in because the other two players are doing it wrong?
<shrug>. I've spent several weeks of my life at this point on evangelism efforts here. I no longer have time to spend on it, and no one else is doing anything about it.
> I don't even know what "Ian spec" you're referring to here
HTML5. Ian is the editor.
Comment 11•13 years ago
|
||
Comment on attachment 607869 [details] [diff] [review]
Make the global scope polluter work in standards mode too.
As sad as this makes me, I agree we should go ahead and do this.
Attachment #607869 -
Flags: review?(jst) → review+
Assignee | ||
Comment 12•13 years ago
|
||
Flags: in-testsuite+
Whiteboard: [need review]
Target Milestone: --- → mozilla14
Comment 13•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Updated•13 years ago
|
Summary: Should we have a global scope polluter in standards mode? → Enable global scope polluter in standards mode
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•