Closed Bug 2092543 Opened 14 days ago Closed 11 days ago

findXULWidgetInWindow throws instead of returning null for a node outside every customizable area

Categories

(Firefox :: Toolbars and Customization, defect)

defect

Tracking

()

RESOLVED FIXED
162 Branch
Tracking Status
firefox162 --- fixed

People

(Reporter: florian, Assigned: florian)

References

Details

Attachments

(1 external file)

CustomizableUIInternal.findXULWidgetInWindow walks up a node's ancestors with parentNode, looking for a customization target or the palette. For a node outside all of them the walk reaches the Document, and getCustomizationTarget calls hasAttribute on it, throwing TypeError: aElement.hasAttribute is not a function instead of returning null.

Walking with parentElement stops the loop at the document element.

For a node outside every area and the palette, the ancestor walk reached the Document and getCustomizationTarget threw calling hasAttribute on it, instead of the lookup returning null.

Blocks: 2092566
Pushed by fqueze@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/e0ca4bb7d072 https://hg.mozilla.org/integration/autoland/rev/11eb9487a7d3 Stop findXULWidgetInWindow's search for a customization target at the document element, r=firefox-desktop-core-reviewers ,Gijs.
Status: ASSIGNED → RESOLVED
Closed: 11 days ago
Resolution: --- → FIXED
Target Milestone: --- → 162 Branch
QA Whiteboard: [qa-triage-done-c163/b162]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: