forked from mirrors/gecko-dev
Bug 1757463 - Avoid getting a pres context when detached from the editor.
MANUAL PUSH: Trivial orange fix CLOSED TREE
This commit is contained in:
parent
a609cded7e
commit
124ea3bca7
1 changed files with 4 additions and 4 deletions
|
|
@ -643,6 +643,10 @@ nsresult EditorEventListener::KeyPress(WidgetKeyboardEvent* aKeyboardEvent) {
|
|||
return rv;
|
||||
}
|
||||
|
||||
if (DetachedFromEditorOrDefaultPrevented(aKeyboardEvent)) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
auto GetWidget = [&]() -> nsIWidget* {
|
||||
if (aKeyboardEvent->mWidget) {
|
||||
return aKeyboardEvent->mWidget;
|
||||
|
|
@ -663,10 +667,6 @@ nsresult EditorEventListener::KeyPress(WidgetKeyboardEvent* aKeyboardEvent) {
|
|||
}
|
||||
}
|
||||
|
||||
if (DetachedFromEditorOrDefaultPrevented(aKeyboardEvent)) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
if (!ShouldHandleNativeKeyBindings(aKeyboardEvent)) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue