Commit 28cf495a authored by Ronan Abhamon's avatar Ronan Abhamon

fix(ui/modules/Common/SearchBox): hide menu if height, width, x or y are updated

parent 59f4131d
...@@ -89,6 +89,8 @@ Item { ...@@ -89,6 +89,8 @@ Item {
var window = searchBox.Window.window var window = searchBox.Window.window
var handleCoords = function () { var handleCoords = function () {
searchBox.hideMenu()
var point = searchBox.mapToItem(null, 0, searchBox.height) var point = searchBox.mapToItem(null, 0, searchBox.height)
desktopPopup.popupX = window.x + point.x desktopPopup.popupX = window.x + point.x
...@@ -98,12 +100,11 @@ Item { ...@@ -98,12 +100,11 @@ Item {
// The menu is always below the search field. // The menu is always below the search field.
this.connect(window, 'heightChanged', handleCoords) this.connect(window, 'heightChanged', handleCoords)
this.connect(window, 'widthChanged', handleCoords) this.connect(window, 'widthChanged', handleCoords)
this.connect(window, 'xChanged', handleCoords) this.connect(window, 'xChanged', handleCoords)
this.connect(window, 'yChanged', handleCoords) this.connect(window, 'yChanged', handleCoords)
this.connect(window, 'visibilityChanged', function () { this.connect(window, 'visibilityChanged', handleCoords)
searchBox.hideMenu()
})
handleCoords() handleCoords()
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment