on xenial help sign in
unfocus the drawer's textfield when it is moved (LP: #1669839)

Approved by: Albert Astals Cid, Unity8 CI Bot

commitbdc952ba1b7ba0eceacdf7bcd2e5de146ff368ad authorMichael Zanetti <michael.zanetti@canonical.com> dateTue 21 Mar 2017, 10:54 (10 years ago) parent76455013ee0244
2 files changed+8
qml/Launcher/Drawer.qml+1 qml/Launcher/Launcher.qml+7
qml/Launcher/Drawer.qml+1
@@ -27,6 +27,7 @@ FocusScope {
2727
2828 property int panelWidth: 0
2929 readonly property bool moving: listLoader.item && listLoader.item.moving
30+ readonly property Item searchTextField: searchField
3031
3132 signal applicationSelected(string appId)
3233
qml/Launcher/Launcher.qml+7
@@ -364,6 +364,13 @@ FocusScope {
364364 topMargin: root.inverted ? root.topPanelHeight : 0
365365 bottom: parent.bottom
366366 right: parent.left
367+ onRightMarginChanged: {
368+ // Remove (and put back) the focus for the searchfield in
369+ // order to hide the copy/paste popover when we move the drawer
370+ var hadFocus = drawer.searchTextField.focus;
371+ drawer.searchTextField.focus = false;
372+ drawer.searchTextField.focus = hadFocus;
373+ }
367374 }
368375 width: Math.min(root.width, units.gu(90)) * .9
369376 panelWidth: panel.width