| Summary: | Insertion point is missing after focusing a text field that has been emptied | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | mitz |
| Component: | HTML Editing | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW --- | ||
| Severity: | Normal | CC: | cdumez, jond, thorton, webkit-bug-importer, wenson_hsieh |
| Priority: | P2 | Keywords: | InRadar |
| Version: | Safari 13 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| URL: | data:text/html,<input%20value=0%20autofocus> | ||
|
Description
mitz
2020-06-17 09:04:42 PDT
Maybe focusing the empty field makes an empty selection in it (as normally focusing a field selects the entire contents) that is somehow different from a caret selection. Doesn’t happen if the text field never contained anything (the apparent difference being the presence or lack of a <br> in the shadow DOM). I'm able to repro. Some debug logging in FrameSelection::setSelectionWithoutUpdatingAppearance...
After deleting:
OLD: { OffsetInAnchor(<DIV 0x11dc9e2f0 id='' class=''>, 0) }
NEW: { BeforeAnchor(<BR 0x11dc9f380 id='' class=''>) }
After tabbing to the unified field:
OLD: { BeforeAnchor(<BR 0x11dc9f380 id='' class=''>) }
NEW: { None }
After tabbing back to the text field:
OLD: { None }
NEW: { BeforeAnchor(<BR 0x11dc9f380 id='' class=''>), AfterAnchor(<BR 0x11dc9f380 id='' class=''>) }
Also reproduces on stock Safari in macOS 10.15.6 |