Bug 301443

Summary: UIEvents misbehaving when inline text prediction is active
Product: WebKit Reporter: Franco Vieira de Souza <franco_vieira>
Component: UI EventsAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: lily_spiniolas, richard_robinson2, rniwa, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: Safari 26   
Hardware: Unspecified   
OS: Unspecified   

Franco Vieira de Souza
Reported 2025-10-24 14:02:04 PDT
On macOS, while the inline text prediction is activated (grayed out text in front of what was already written), the UIEvents received by the the DOM seem to misbehave: a `compositionend` with no corresponding `compositionstart` event is fired; `keydown` events are ignored, and keyup events are being buffered (being dispatched all at once when the prediction ends). `input` and `beforeinput` events seem to fire normally. Here's an excerpted log of what I observe when typing out `autocompl.` , which produces the text `autocomplete.`. Inline text prediction activated after typing out the first e; the second one is filled in after typing `.`, accepting the prediction: ``` a keydown; tstamp=633.46s at t=633.47s a keypress; tstamp=633.46s at t=633.49s a beforeinput; tstamp=633.49s at t=633.49s a input; tstamp=633.50s at t=633.50s a keyup; tstamp=633.58s at t=633.59s u keydown; tstamp=633.59s at t=633.61s u keypress; tstamp=633.59s at t=633.63s u beforeinput; tstamp=633.63s at t=633.63s u input; tstamp=633.64s at t=633.64s u keyup; tstamp=633.73s at t=633.74s ( . . . omitting letters t-o-c-o-m-p . . . ) l type=keydown; tstamp=635.83s at t=635.84s l type=keypress; tstamp=635.83s at t=635.86s l type=beforeinput; tstamp=635.86s at t=635.86s l type=input; tstamp=635.87s at t=635.87s l type=keyup; tstamp=635.92s at t=635.92s ( prediction start with e, it has its keyup buffered ) e type=keydown; tstamp=636.73s at t=636.74s e type=keypress; tstamp=636.73s at t=636.76s e type=beforeinput; tstamp=636.76s at t=636.76s e type=input; tstamp=636.76s at t=636.76s ( random compositionend? ) e type=compositionend; tstamp=637.09s at t=637.09s ( t is typed, filling a grayed out letter; no keydown is produced, and the keyup is buffered ) t type=beforeinput; tstamp=637.36s at t=637.36s t type=input; tstamp=637.36s at t=637.36s ( typing . accepts the prediction ) . type=beforeinput; tstamp=639.14s at t=639.14s . type=input; tstamp=639.14s at t=639.14s ( buffered events fired at once, in sequence, with old timestamps ) e type=keyup; tstamp=636.79s at t=639.15s t type=keyup; tstamp=637.43s at t=639.18s . type=keyup; tstamp=639.19s at t=639.23s ```
Attachments
Radar WebKit Bug Importer
Comment 1 2025-10-24 14:02:37 PDT
Note You need to log in before you can comment on or make changes to this bug.