Make `EditorBase::OnCompositionChange` always dispatch `input` event whose `isComposing` is `true` with a pref
Categories
(Core :: DOM: Editor, enhancement)
Tracking
()
Tracking | Status | |
---|---|---|
firefox136 | --- | fixed |
People
(Reporter: masayuki, Assigned: masayuki)
References
(Blocks 1 open bug, )
Details
(Keywords: webcompat:platform-bug)
User Story
platform-scheduled:2025-03-31
Attachments
(1 file)
Although dispatching redundant input
event before compositionend
breaks the pairs of beforeinput
and input
for each edit, the reported site in bug 1910865 seems stores HTMLInputElement.value
value at input
and tries to use it in compositionend
. So, redundant input
event could fix the issue on the web site.
Updated•1 month ago
|
Assignee | ||
Comment 1•1 month ago
|
||
Minimized testcase: https://jsfiddle.net/d_toybox/ec8a5g3w/
And it should be like: https://jsfiddle.net/d_toybox/ec8a5g3w/1/
I posted "intent to ship": https://groups.google.com/a/mozilla.org/g/dev-platform/c/yAbeVQR2D4Y
Assignee | ||
Comment 2•1 month ago
|
||
The reported web site in bug 1910865 sets HTMLInputElement.value
to the
latest value explicitly at every input
event except when during a composition.
When it's in a composition, it stores the latest value at input
events during
the composition and set it at compositionend
event listener.
Currently, Gecko dispatches the events as the following order at ending a
composition:
beforeinput
whoseisComposing
istrue
compositionend
input
whoseisComposing
isfalse
Therefore, if user chooses the commit string from the candidate list, the
commit string is not notified by input
event before the compositionend
.
On the other hand, Chrome dispatch the events as the following order:
beforeinput
whoseisComposing
istrue
input
whoseisComposing
istrue
compositionend
I.e., no input
event is fired after compositionend
and there is no input
event whose isComposing
is false
. This is handled in the spec issue [1],
but not yet resolved.
Perhaps, we can dispatch redundant input
event before compositionend
event,
i.e.,
beforeinput
whoseisComposing
istrue
input
whoseisComposing
istrue
compositionend
input
whoseisComposing
isfalse
This breaks the pair of beforeinput
and input
, but I guess it's not
important for web apps especially for the redundant input
event case.
Updated•1 month ago
|
Description
•