prevent action handler fired twice

This commit is contained in:
Yuri Kuznetsov
2025-10-09 09:24:09 +03:00
parent 25c88259f8
commit df2f857197
+5
View File
@@ -121,6 +121,11 @@ Espo.Utils = {
});
}
else if (typeof view[method] === 'function') {
if (view?.events[`click [data-action="${action}"]`]) {
// Prevents from firing if a handler is already assigned. Important.
return false;
}
view[method].call(view, data, event);
event.preventDefault();