Closed Bug 1532291 Opened 5 years ago Closed 5 years ago

Tabbing out of a component which has tabindex -1 and shadow root freezes the browser

Categories

(Core :: DOM: Core & HTML, defect, P2)

65 Branch
defect

Tracking

()

RESOLVED FIXED
mozilla67
Tracking Status
firefox-esr60 --- unaffected
firefox65 --- wontfix
firefox66 --- wontfix
firefox67 --- fixed

People

(Reporter: vilevicius, Assigned: smaug)

References

(Blocks 1 open bug)

Details

(Keywords: hang, regression)

Attachments

(2 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.119 Safari/537.36

Steps to reproduce:

  1. Create simple web component with shadow DOM, slot and tabindex=-1.
  2. Nest component in the same component, add several levels.
  3. Focus node in the top level and press tab.

Here is the code example:
https://codepen.io/anon/pen/ywJqzm

Actual results:

Browser freezes (time of freeze depends on nested levels)

Expected results:

Next focusable element is focused.

Blocks: shadowdom
Component: Untriaged → DOM
Keywords: hang
Product: Firefox → Core

I can reproduce the gang on Nightly67.0a1 windows10.

Status: UNCONFIRMED → NEW
Ever confirmed: true

s/gang/hang/

Regression window:
https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=97898f7472fb0f9e73f4edfb27b2b25e05fd9611&tochange=0dad5cbc6165abc5e395bfb3be995b0da69e7212

Regressed by:
0dad5cbc6165 Olli Pettay — Bug 1466581, handle sequential focus also in nested shadow DOM, r=mrbkap

Blocks: 1466581
Keywords: regression
Has Regression Range: --- → yes
Has STR: --- → yes

Thanks Alice!

Assignee: nobody → bugs
Priority: -- → P2

Setting to fix-optional for 66 b/c P2

Interesting. It isn't a hang, but (very) slow performance.

Need to write a testcase tomorrow

Component: DOM → DOM: Core & HTML

If aIgnoreTabIndex is true, we're just trying to find any focusable element, doesn't matter which tabindex it has.
So better to bail out early from the deeply nested GetNextTabbableContentInScope to avoid exponential number of calls.

filed bug 1535320 to rename the test file

Pushed by opettay@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/0cc6396199a8
bail out early when trying to find any focusable element in shadow tree, r=masayuki
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla67
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: