Im fairly new to webix and i might be missing something but…
so i have a simple button with code
var button1 = { view:“button” ,
id:“stand” ,
label:“Standard” ,
on:{ onItemClick: function(id , e , node){ alert(“this is alert” );} }
};
webix.ui({
container:"testdiv",
cols:[
button1
]
});
there is a div inside the body with the id=“testdiv”
but when i click on the button the function is fired twice
ive tried e.stopPropagation(); and e.preventDefault();
nothing works , it always fires twice.
any idea on why it might happen and how to solve this issue?
The code is correct, you can check it here:
http://webix.com/snippet/f6cc627f
So the problem must be somewhere else. Can you provide more details?
maksim
December 7, 2015, 11:28am
3
Be sure that you are using the latest version, similar issue was in one of older builds.
jenik
January 28, 2016, 3:53pm
4
I had same issue, turned out the webix.js script was included twice in my index.html
ive post this long time ago, it was the older version problem where i was loading off the local computer,
loading it from the cdn fixed the issue.
I have the same problem in iPhone and in iPhone emulator in Google Chrome.
(webix 5.3 PRO)
Helga
June 25, 2018, 10:33am
7
Hello,
From our side everything seems to work fine - the click event fires once in any environment.
By the way, the issue may occur if you include the “webix.js” file twice, as the logic catches global clicks and translates them into input events. So please check whether you have multiple inlcudes and remove them, if so.