Closed Bug 2001746 Opened 4 months ago Closed 4 months ago

moz-box-group throws an error after clicking on whitespace inside of it then pressing a key

Categories

(Toolkit :: UI Widgets, defect, P2)

defect

Tracking

()

RESOLVED FIXED
147 Branch
Tracking Status
firefox147 --- fixed

People

(Reporter: mstriemer, Assigned: mstriemer)

References

Details

(Whiteboard: [recomp] [srdbb])

Attachments

(1 file)

In handleKeydown we attempt to find the current index of the focused element, but if you click on some whitespace within the moz-box-group and press a key, we still get the keypress event, but on the ul we attached our listener to. It doesn't have a position or a parent with a position since it is the container for positioned elements.

STR

  1. Render a moz-box-group
  2. Click on some whitespace in it (but not text that's part of another child element)
  3. Press a key

Expected results: nothing happens
Actual results: JavaScript error: chrome://global/content/elements/moz-box-group.mjs, line 127: TypeError: can't access property "getAttribute", event.target.closest(...) is null

https://searchfox.org/firefox-main/rev/82e2435fd101e64854b8c56ac792c8a5522db4fe/toolkit/content/widgets/moz-box-group/moz-box-group.mjs#127

Severity: -- → S4
Status: NEW → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → 147 Branch
QA Whiteboard: [qa-triage-done-c148/b147]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: