Skip to content

Commit c977618

Browse files
committed
attachHideHandlers
1 parent 0e6cd45 commit c977618

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

services/static-webserver/client/source/class/osparc/dashboard/SearchBarFilterProjects.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ qx.Class.define("osparc.dashboard.SearchBarFilterProjects", {
4242
this.__currentFilter = null;
4343

4444
qx.core.Init.getApplication().getRoot().add(this);
45+
46+
this.__attachHideHandlers();
4547
},
4648

4749
events: {
@@ -130,6 +132,17 @@ qx.Class.define("osparc.dashboard.SearchBarFilterProjects", {
130132
this.getChildControl("search-bar");
131133
},
132134

135+
__attachHideHandlers: function() {
136+
const tapListener = e => {
137+
if (osparc.utils.Utils.isMouseOnElement(this, e)) {
138+
return;
139+
}
140+
this.exclude();
141+
document.removeEventListener("mousedown", tapListener);
142+
};;
143+
document.addEventListener("mousedown", tapListener);
144+
},
145+
133146
__buildFiltersMenu: function() {
134147
if (this.__filtersMenu === null) {
135148
this.__filtersMenu = new qx.ui.menu.Menu();

0 commit comments

Comments
 (0)