Index: openacs-4/packages/acs-templating/tcl/head-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/head-procs.tcl,v diff -u -N -r1.45.2.39 -r1.45.2.40 --- openacs-4/packages/acs-templating/tcl/head-procs.tcl 31 Aug 2023 13:01:36 -0000 1.45.2.39 +++ openacs-4/packages/acs-templating/tcl/head-procs.tcl 31 Aug 2023 13:13:50 -0000 1.45.2.40 @@ -1002,17 +1002,13 @@ console.log("blocked double-click"); return false; } else { - // Disabling the button and re-enabling after - // the timeout must both be queued after all - // other click handlers have completed to ensure - // their correct execution order. setTimeout(function () { target.disabled = true; target.dataset.oacsClicked = true; target.classList.add("disabled"); - let timeout = target.dataset.oacsTimeout || $default_timeout; - setTimeout(oacs_reenable_double_click_handler, timeout, target); }); + const timeout = target.dataset.oacsTimeout || $default_timeout; + setTimeout(oacs_reenable_double_click_handler, timeout, target); return true; } }, true);