From 3ddc810a602d9ecfc3c4b30c4db6f96e7354973b Mon Sep 17 00:00:00 2001 From: nguillaumin Date: Tue, 12 Mar 2013 15:36:50 +1100 Subject: [PATCH] Prevent search/replace controls to submit the container form The search/replace buttons are seen as "submit" type because the type attribute is not specified. If ACE is embedded within a form (between
...
) clicking on one of these button will submit the outer form. Setting search/replace buttons type to "button" prevents the outer form to be submitted. --- lib/ace/ext/searchbox.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/ace/ext/searchbox.js b/lib/ace/ext/searchbox.js index 976191b0..64e3f6de 100644 --- a/lib/ace/ext/searchbox.js +++ b/lib/ace/ext/searchbox.js @@ -41,16 +41,16 @@ var keyUtil = require("../lib/keys"); dom.importCssString(searchboxCss, "ace_searchbox"); var html = ''.replace(/>\s+/g, ">");