svghmi/widget_dropdown.ysl2
branchsvghmi
changeset 2932 abb995a30088
parent 2931 f51c0e2e0bcb
child 2933 ed3f712a8eef
--- a/svghmi/widget_dropdown.ysl2	Tue Apr 14 17:31:45 2020 +0200
+++ b/svghmi/widget_dropdown.ysl2	Tue Apr 14 19:22:18 2020 +0200
@@ -84,12 +84,12 @@
             e.stopPropagation();
     },
     close: function(){
+        document.removeEventListener("click", this.bound_inhibit_click_elsewhere, true);
         this.reset_text();
         this.reset_box();
         this.element.appendChild(this.button_elt);
+        this.opened = false;
         this.apply_cache();
-        document.removeEventListener("click", this.bound_inhibit_click_elsewhere, true);
-        this.opened = false;
     },
     set_complete_text: function(){
         let spans = this.text_elt.children;