Bug 241902 - Pressing shift+tab when focused in the middle of a contenteditable element doesn't work
Summary: Pressing shift+tab when focused in the middle of a contenteditable element do...
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: Safari 15
Hardware: Mac (Apple Silicon) macOS 12
: P2 Normal
Assignee: Ryosuke Niwa
Keywords: InRadar
Depends on:
Reported: 2022-06-22 21:16 PDT by Jamie Birch
Modified: 2022-06-30 22:59 PDT (History)
7 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Jamie Birch 2022-06-22 21:16:10 PDT

1: Navigate to: data:text/html,<div><button>Bold</button><button>Italic</button><div%20contenteditable="true">Hello</div><button>Bold</button><button>Italic</button></div>

2. Click between the 'e' and the 'l' in 'Hello'.

3. Press shift+tab

Expected results:
Focus moves to the "Italic" button

Actual results:
Focus doesn't change.

Firefox and Chrome produce the expected results, as does a regular <input type="text"> field.
Comment 1 Jamie Birch 2022-06-22 21:22:55 PDT
The expected results assume that the user has turned on Preferences... > Advanced > Accessibility > "Press Tab to highlight each item on a web page".

If the user has turned this setting off, then the actual result (focus doesn't change) is still true, but instead the expected behaviour would have been for focus to move to the URL bar.
Comment 2 Alexey Proskuryakov 2022-06-23 20:18:44 PDT
I can reproduce this. Very weird!
Comment 3 Radar WebKit Bug Importer 2022-06-29 21:17:12 PDT
Comment 4 Ryosuke Niwa 2022-06-30 15:37:32 PDT
Likely a regression from https://trac.webkit.org/r201832.
Comment 5 Ryosuke Niwa 2022-06-30 20:01:33 PDT
Pull request: https://github.com/WebKit/WebKit/pull/1975
Comment 6 EWS 2022-06-30 22:59:03 PDT
Committed 252029@main (7dc7f7fcb381): <https://commits.webkit.org/252029@main>

Reviewed commits have been landed. Closing PR #1975 and removing active labels.