From df2f857197d1e4c6489c7cb875fd5e8012f1678f Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Thu, 9 Oct 2025 09:24:09 +0300 Subject: [PATCH] prevent action handler fired twice --- client/src/utils.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/client/src/utils.js b/client/src/utils.js index c9a3cef3d3..0f33f7249d 100644 --- a/client/src/utils.js +++ b/client/src/utils.js @@ -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();