Bug 224932

Summary: AX: compositionend not fired when there is no selection in accent menu
Product: WebKit Reporter: Benny Martinson <bennymartinson>
Component: HTML EditingAssignee: Nobody <webkit-unassigned>
Status: REOPENED    
Severity: Normal CC: ahmad.saleem792, ap, megan_gardner, mmaxfield, rniwa, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: Safari 14   
Hardware: All   
OS: All   
Attachments:
Description Flags
compositionend not fired none

Benny Martinson
Reported 2021-04-22 08:03:36 PDT
See http://jsfiddle.net/c46koq57/ for a repro with these steps. Repro instructions: Put the cursor in the contenteditable box in the fiddle. Long-press a vowel, until the accent menu opens. Arrow right to select a replacement. Arrow left to unselect that replacement. Now type any character. Expected behavior: A compositionend event should be dispatched when a character is typed (which will be logged to the console). Actual behavior: No compositionend event is dispatched, which can cause IME handling code to get into a bad state since there was a compositionstart event. This does work correctly if we have a replacement selected before typing a new character. The bug is not reproducible in Chrome or Firefox.
Attachments
compositionend not fired (1.24 MB, video/quicktime)
2022-11-28 12:54 PST, Benny Martinson
no flags
Radar WebKit Bug Importer
Comment 1 2021-04-22 08:03:48 PDT
Ahmad Saleem
Comment 2 2022-11-26 17:59:17 PST
I just tried this in Safari 16.1 and when I long press "a" and follow all instruction "compositionend" event does get fired. Just wanted to post testing result. Thanks!
Ryosuke Niwa
Comment 3 2022-11-28 12:28:29 PST
This seems to be working on Safari 16.1.
Benny Martinson
Comment 4 2022-11-28 12:51:10 PST
I'm still seeing the bug in Safari Version 16.1 (17614.2.9.1.13, 17614), macOS 12.6.1.
Benny Martinson
Comment 5 2022-11-28 12:54:20 PST
Created attachment 463768 [details] compositionend not fired See the attached video.
Ryosuke Niwa
Comment 6 2022-11-28 12:54:28 PST
Oh I see. The issue is that the typed character is never processed. As a result, compositionend doesn't fire until the selection is moved elsewhere.
Note You need to log in before you can comment on or make changes to this bug.