Don't fire input event before firing startcomposition
Categories
(GeckoView :: IME, defect, P3)
Tracking
(firefox87 fixed)
Tracking | Status | |
---|---|---|
firefox87 | --- | fixed |
People
(Reporter: m_kato, Assigned: m_kato)
References
Details
Attachments
(1 file)
When debugging bug 1633621, I found this issue.
Now, we always remove selected string to set composition string when firing compositionstart. This means that input event is fired before firing compositionstart.
if (performDeletion) {
WidgetContentCommandEvent event(true, eContentCommandDelete, widget);
event.mTime = PR_Now() / 1000;
widget->DispatchEvent(&event, status);
...
}
if (composing) {
mDispatcher->SetPendingComposition(string, mIMERanges);
mDispatcher->FlushPendingComposition(status);
...
}
But, when string composition, it is unnecessary to remove selected string (fire input event) if we use StartComposition
instead. So we can reduce event counts.
Assignee | ||
Comment 1•3 years ago
|
||
Actually, before starting composition, we always remove current selected
text. So it causes that input event is fired by this operation. This is
different of Blink.
TextEventDispatcher
can set composition string using selected text when
starting composition. So we can reduce this input event.
Also, I mistake bug 1499076 fix. By this fix, we always fires input event
when having selected text even if it is unnecessary. This changeset has
this fix too.
Pushed by m_kato@ga2.so-net.ne.jp: https://hg.mozilla.org/integration/autoland/rev/ce73c96906f4 Don't dispatch unnecessary input event when we dispatch composition start with selected text. r=geckoview-reviewers,agi
Comment 3•3 years ago
|
||
bugherder |
Comment 4•1 year ago
|
||
Moving some input bugs to the new GeckoView::IME component.
Description
•