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.
<rdar://problem/77018817>
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!
This seems to be working on Safari 16.1.
I'm still seeing the bug in Safari Version 16.1 (17614.2.9.1.13, 17614), macOS 12.6.1.
Created attachment 463768 [details] compositionend not fired See the attached video.
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.