mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1240286 - Deleting text with backspace causes the action bar to glitch, r=smaug, TYLin, jchen
This commit is contained in:
parent
52ca557cf0
commit
41443fd558
@ -116,17 +116,10 @@ AccessibleCaretManager::OnSelectionChanged(nsIDOMDocument* aDoc,
|
||||
}
|
||||
|
||||
// eSetSelection events from the Fennec widget IME can be generated
|
||||
// by autoSuggest, autoCorrect, and nsCaret position changes.
|
||||
// by autoSuggest / autoCorrect composition changes, or by TYPE_REPLACE_TEXT
|
||||
// actions, either positioning cursor for text insert, or selecting
|
||||
// text-to-be-replaced. None should affect AccessibleCaret visibility.
|
||||
if (aReason & nsISelectionListener::IME_REASON) {
|
||||
if (GetCaretMode() == CaretMode::Cursor) {
|
||||
// Caret position changes need us to open/update,
|
||||
// or hide the AccessibleCaret.
|
||||
FlushLayout();
|
||||
UpdateCarets();
|
||||
} else {
|
||||
// Ignore transient autoSuggest selection styling,
|
||||
// or autoCorrect text updates.
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -2919,11 +2919,14 @@ nsWindow::GeckoViewSupport::OnImeReplaceText(int32_t aStart, int32_t aEnd,
|
||||
window.RemoveIMEComposition();
|
||||
|
||||
{
|
||||
// Use text selection to set target postion(s) for
|
||||
// insert, or replace, of text.
|
||||
WidgetSelectionEvent event(true, eSetSelection, &window);
|
||||
window.InitEvent(event, nullptr);
|
||||
event.mOffset = uint32_t(aStart);
|
||||
event.mLength = uint32_t(aEnd - aStart);
|
||||
event.mExpandToClusterBoundary = false;
|
||||
event.mReason = nsISelectionListener::IME_REASON;
|
||||
window.DispatchEvent(&event);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user