Closed
Bug 268036
Opened 20 years ago
Closed 20 years ago
ID in global scope doesn't work if page is loaded in a background tab
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
VERIFIED
FIXED
People
(Reporter: bugzilla, Unassigned)
References
Details
Attachments
(2 files)
104 bytes,
text/html
|
Details | |
1.23 KB,
patch
|
shaver
:
review+
brendan
:
superreview+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041103 Firefox/1.0RC2 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041103 Firefox/1.0RC2 ID/Name in global scope was introduced in bug 256932. If a page is loaded in a background tab then any references to elements using global scope gives an error in the JS console. Reproducible: Always Steps to Reproduce: 1. Load the attached testcase in the foreground by clicking with the first mouse button. Click the 'find foo' button. 2. Load the attached testcase in a background tab by middle clicking. Wait until it has loaded before switching to it and clicking 'find foo'. Actual Results: In the first case alert(foo) displays [object HTMLDivElement] In the second case the JS console reports 'foo is not defined'. Expected Results: foo is found in in both cases.
Reporter | ||
Comment 1•20 years ago
|
||
Reporter | ||
Comment 2•20 years ago
|
||
This also happens with the latest seamonkey nightly (2004111106)
OS: Windows XP → All
Comment 3•20 years ago
|
||
Confirming. This is pretty weird....
Status: UNCONFIRMED → NEW
Ever confirmed: true
Updated•20 years ago
|
Flags: blocking1.8a5?
Comment 4•20 years ago
|
||
Johnny, can you take a look at this?
Updated•20 years ago
|
Flags: blocking1.8a5? → blocking1.8a5+
Comment 5•20 years ago
|
||
Doesn't look like jst is going to have this debugged in time for a5.
Flags: blocking1.8a5+ → blocking1.8a5-
Comment 6•20 years ago
|
||
This was silly. The code that installs the global scope polluter wasn't run on the first document load, which normally isn't a problem since we pretty much always end up loading about:blank into every new window before the real document is inserted into the window, so the real document got the global scope polluter, but not the initial about:blank document. This makes the global scope polluter be installed for the first document too.
Updated•20 years ago
|
Attachment #166805 -
Flags: superreview?(brendan)
Attachment #166805 -
Flags: review?(shaver)
Comment on attachment 166805 [details] [diff] [review] Install the global scope polluter on first load too. Man, that's nowhere near as interesting as the crazy docshell-walking theories I concocted! r=shaver.
Attachment #166805 -
Flags: review?(shaver) → review+
Comment 8•20 years ago
|
||
Comment on attachment 166805 [details] [diff] [review] Install the global scope polluter on first load too. Hmm, forgot about the first-document-load special case.... /be
Attachment #166805 -
Flags: superreview?(brendan) → superreview+
Both times loading the testcase https://bugzilla.mozilla.org/attachment.cgi?id=164808&action=view, [object HTMLDivElement] is alert()ed just fine now, using build 2004-11-28-06 on Windows XP, Seamonkey trunk.
Status: RESOLVED → VERIFIED
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•