mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 23:02:20 +00:00
Bug 1254629 - Ensure content root is in document when flushing IME changes; r=esawin
One work-around for the bug is to ensure that our content root is in a document when flushing IME changes, because when an input becomes hidden, the previous content root is removed from the document.
This commit is contained in:
parent
eb65d5bc9f
commit
2b624272eb
@ -2691,6 +2691,10 @@ nsWindow::GeckoViewSupport::FlushIMEChanges(FlushChangesFlag aFlags)
|
||||
MOZ_ALWAYS_TRUE(NS_SUCCEEDED(IMEStateManager::GetFocusSelectionAndRoot(
|
||||
getter_AddRefs(imeSelection), getter_AddRefs(imeRoot))));
|
||||
|
||||
// Make sure we still have a valid selection/root. We can potentially get
|
||||
// a stale selection/root if the editor becomes hidden, for example.
|
||||
NS_ENSURE_TRUE_VOID(imeRoot->IsInComposedDoc());
|
||||
|
||||
RefPtr<nsWindow> kungFuDeathGrip(&window);
|
||||
window.UserActivity();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user