UI/Qt: Submit autocomplete selections directly
When Return is pressed while the autocomplete popup is visible, submit the location edit directly instead of falling through to QLineEdit's default key handling after closing the popup. This keeps the omnibox responsive to Return after chrome layout changes rebuild nearby widgets.
This commit is contained in:
parent
60847b9937
commit
51c9ffc8d8
1 changed files with 3 additions and 0 deletions
|
|
@ -487,6 +487,9 @@ void LocationEdit::keyPressEvent(QKeyEvent* event)
|
|||
m_is_applying_inline_autocomplete = false;
|
||||
}
|
||||
m_autocomplete->close();
|
||||
emit returnPressed();
|
||||
event->accept();
|
||||
return;
|
||||
}
|
||||
|
||||
if (should_suppress_inline_autocomplete_for_key(event))
|
||||
|
|
|
|||
Loading…
Reference in a new issue