applets/clipboard: Focus on the search field for the first time opening the applet

So Up/Down key can navigate the list items instead of scrolling in
the ListView.

CCBUG: 448811


(cherry picked from commit 7661578438)
wilder-5.24
Fushan Wen 4 years ago
parent 9e0baec1df
commit 33df8fc796
  1. 3
      applets/clipboard/contents/ui/ClipboardPage.qml

@ -163,6 +163,9 @@ Menu {
// Intercept up/down key to prevent ListView from accepting the key event.
clipboardMenu.view.Keys.upPressed.connect(clipboardMenu.arrowKeyPressed);
clipboardMenu.view.Keys.downPressed.connect(clipboardMenu.arrowKeyPressed);
// Focus on the search field when the applet is opened for the first time
filter.forceActiveFocus();
}
function goToCurrent() {

Loading…
Cancel
Save