diff --git a/web/org.openbravo.mobile.core/source/utils/ob-dom-extension.js b/web/org.openbravo.mobile.core/source/utils/ob-dom-extension.js
index d5e880d2c..348cbaaf9 100644
--- a/web/org.openbravo.mobile.core/source/utils/ob-dom-extension.js
+++ b/web/org.openbravo.mobile.core/source/utils/ob-dom-extension.js
@@ -1,6 +1,6 @@
 /*
  ************************************************************************************
- * Copyright (C) 2018 Openbravo S.L.U.
+ * Copyright (C) 2018-2024 Openbravo S.L.U.
  * Licensed under the Openbravo Commercial License version 1.0
  * You may obtain a copy of the License at http://www.openbravo.com/legal/obcl.html
  * or in the legal folder of this module distribution.
@@ -39,11 +39,17 @@
     avoidDoubleClick(event, elmt);
   }
   var debounceMouseDown = _.debounce(mouseDown, 1);
-  document.addEventListener('DOMNodeInserted', function(nodeEvent) {
-    if (nodeEvent && nodeEvent.srcElement) {
-      nodeEvent.srcElement.onmousedown = debounceMouseDown;
-    }
-  });
+  const config = { childList: true, subtree: true };
+  const callback = (mutationsList, observer) => {
+    mutationsList.forEach(function(mutation) {
+      if (mutation && mutation.target) {
+        mutation.target.onpointerdown = debounceMouseDown;
+      }
+    });
+  };
+  const observer = new MutationObserver(callback);
+  observer.observe(document, config);
+
   document.onkeydown = function(k) {
     if (k.key) {
       OB.UTIL.TerminalLog.addKeyPress(k);
