From 3ebf136099c06b35cfddc627717981da1d4e5af6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mauro=20Ferr=C3=A3o?= Date: Mon, 18 Nov 2024 10:48:19 +0000 Subject: [PATCH] Layout Editor: Prevent toolbox Enter key form submit (#2803) relates to xibosignage/xibo#3549 --- ui/src/editor-core/toolbar.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ui/src/editor-core/toolbar.js b/ui/src/editor-core/toolbar.js index 3b16995d08..5a605a320d 100644 --- a/ui/src/editor-core/toolbar.js +++ b/ui/src/editor-core/toolbar.js @@ -1309,6 +1309,11 @@ Toolbar.prototype.loadContent = function( // Create content this.createContent(menu, forceReload); + // Prevent default form submit + this.DOMObject.find('#content-' + menu + ' form').submit(function(e) { + e.preventDefault(); + }); + // Save user preferences (savePrefs) && this.savePrefs(); };