WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
327413
[GTK][WPE] Input method commit without a preedit dispatches compositionend without compositionstart
https://bugs.webkit.org/show_bug.cgi?id=327413
Summary
[GTK][WPE] Input method commit without a preedit dispatches compositionend wi...
Simon Pena
Reported
2026-10-13 09:21:33 PDT
When an input method commits text without a preedit, for example a keyboard that commits a whole suggestion at once, the page receives compositionend, and a beforeinput with inputType insertFromComposition, but no compositionstart. InputMethodFilter::committed() calls webkitWebViewConfirmComposition(), which ends in Editor::setComposition(text, ConfirmComposition). That always dispatches compositionend, whether or not a composition was in progress. Steps (API test): focus a textarea, then emit "committed" with "hello" on the input method context, with no preedit before it. The text is inserted, and the page gets one compositionend and no compositionstart. Expected: either no composition events, with the text inserted as typing (inputType insertText), or a compositionstart before the compositionend. Pages that track composition state, such as rich text editors, can be confused by an unpaired compositionend. Seen first with wpe-android, whose keyboard integration commits every suggestion this way.
Bug 84394
reported the same symptom in 2012 for number keys typed through an input method. Today's key handling path skips one-character commits, but commits outside key handling still get an unpaired compositionend.
Attachments
Add attachment
proposed patch, testcase, etc.
Fujii Hironori
Comment 1
2026-10-14 06:47:32 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/77005
EWS
Comment 2
2026-10-15 00:50:23 PDT
Committed
323806@main
(30178fb84c6f): <
https://commits.webkit.org/323806@main
> Reviewed commits have been landed. Closing PR #77005 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug