svghmi/widget_button.ysl2
branchsvghmi
changeset 3037 da51baea69cb
parent 3024 0a9f6f29b7dd
child 3039 5ca37a7b89e2
--- a/svghmi/widget_button.ysl2	Tue Aug 25 14:32:39 2020 +0200
+++ b/svghmi/widget_button.ysl2	Tue Aug 25 14:34:49 2020 +0200
@@ -33,8 +33,8 @@
                 this.inactive_elt.setAttribute("style", this.inactive_style);
             }
 
-            this.element.setAttribute("onmousedown", "hmi_widgets["+this.element_id+"].on_mouse_down(evt)");
-            this.element.setAttribute("onmouseup", "hmi_widgets["+this.element_id+"].on_mouse_up(evt)");
+            this.element.setAttribute("onmousedown", "hmi_widgets[\""+this.element_id+"\"].on_mouse_down(evt)");
+            this.element.setAttribute("onmouseup", "hmi_widgets[\""+this.element_id+"\"].on_mouse_up(evt)");
          }
     }
     ||