# HG changeset patch # User Edouard Tisserant # Date 1586884938 -7200 # Node ID abb995a30088b008d56203761bfe25c1c8cf4d06 # Parent f51c0e2e0bcb4e9cbc57b26f53e0d0476f105522 SVGHMI: Fix HMI:DropDown flicker on close. diff -r f51c0e2e0bcb -r abb995a30088 svghmi/gen_index_xhtml.xslt --- a/svghmi/gen_index_xhtml.xslt Tue Apr 14 17:31:45 2020 +0200 +++ b/svghmi/gen_index_xhtml.xslt Tue Apr 14 19:22:18 2020 +0200 @@ -991,18 +991,18 @@ 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(){ diff -r f51c0e2e0bcb -r abb995a30088 svghmi/widget_dropdown.ysl2 --- 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;