on xenial help sign in
unfocus the drawer's textfield when it is moved (LP: #1669839)
bdc952bMichael Zanetti
qml/Launcher/Drawer.qml+1
@@ -27,6 +27,7 @@ FocusScope {
27
27
28 property int panelWidth: 0
28 property int panelWidth: 0
29 readonly property bool moving: listLoader.item && listLoader.item.moving
29 readonly property bool moving: listLoader.item && listLoader.item.moving
30+ readonly property Item searchTextField: searchField
30
31
31 signal applicationSelected(string appId)
32 signal applicationSelected(string appId)
32
33
qml/Launcher/Launcher.qml+7
@@ -364,6 +364,13 @@ FocusScope {
364 topMargin: root.inverted ? root.topPanelHeight : 0
364 topMargin: root.inverted ? root.topPanelHeight : 0
365 bottom: parent.bottom
365 bottom: parent.bottom
366 right: parent.left
366 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+ }
367 }
374 }
368 width: Math.min(root.width, units.gu(90)) * .9
375 width: Math.min(root.width, units.gu(90)) * .9
369 panelWidth: panel.width
376 panelWidth: panel.width