Empty string passed to getElementById() when creating lazy tab
Categories
(Firefox :: Tabbed Browser, defect)
Tracking
()
People
(Reporter: Oriol, Assigned: Oriol)
References
(Regression)
Details
(Keywords: regression)
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
Details |
-
Open the Browser Toolbox, switch to the Accessibility tab. I think this enables the accessibility service or something.
-
Then switch to the Console tab and run:
gBrowser.addTrustedTab("http://example.com", {createLazyBrowser: true, skipLoad: true})
Expected: no warning
Actual: tabbrowser-tabs.js:2099:22 triggers this warning:
Empty string passed to getElementById().
/**
* Returns the panel associated with a tab if it has a connected browser
* and/or it is the selected tab.
* For background lazy browsers, this will return null.
*/
getRelatedElement(aTab) {
if (!aTab) {
return null;
}
// Cannot access gBrowser before it's initialized.
if (!gBrowser._initialized) {
return this.tabbox.tabpanels.firstElementChild;
}
// If the tab's browser is lazy, we need to `_insertBrowser` in order
// to have a linkedPanel. This will also serve to bind the browser
// and make it ready to use. We only do this if the tab is selected
// because otherwise, callers might end up unintentionally binding the
// browser for lazy background tabs.
if (aTab.selected) {
gBrowser._insertBrowser(aTab);
}
return document.getElementById(aTab.linkedPanel);
}
Well, of course, if lazy browsers should return null, then this should be done explicitly, not by relying on document.getElementById("")
.
Assignee | ||
Comment 1•3 years ago
|
||
Updated•3 years ago
|
Comment 2•3 years ago
|
||
Set release status flags based on info from the regressing bug 1700708
Comment 4•3 years ago
|
||
bugherder |
Updated•3 years ago
|
Comment 5•3 years ago
|
||
The patch landed in nightly and beta is affected.
:Oriol, is this bug important enough to require an uplift?
If not please set status_beta
to wontfix
.
For more information, please visit auto_nag documentation.
Assignee | ||
Comment 6•3 years ago
|
||
Warning in console doesn't seem important enough.
Updated•3 years ago
|
Comment 7•3 years ago
|
||
I managed to reproduce this on Firefox 100.0(20220428192727) on macOS 11. Verified as fixed on Firefox 101.0b7(20220515185854), Nightly 102.0a1(20220515214519) on Win10 64-bits, Ubuntu 20.04 and macOS 11.
Description
•