From 9409f9ee7d83635d262d303edee9136dd6170e14 Mon Sep 17 00:00:00 2001 From: "ctrlaltca@gmail.com" <> Date: Wed, 21 Dec 2011 13:14:26 +0000 Subject: fixed #66 --- HISTORY | 1 + framework/Web/Javascripts/source/prado/controls/controls.js | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/HISTORY b/HISTORY index 8a1b9c31..0ff1d8ea 100644 --- a/HISTORY +++ b/HISTORY @@ -20,6 +20,7 @@ BUG: TActiveFileUpload: urlencode the base64'ed token since it can contain the " BUG: TCaptcha: publish images with image/png content-type (ctrlaltca) BUG: Issue #35 - [840] Capital letters for the initial letter of the directories name (ctrlaltca) +BUG: Issue #66 - TButton.CausesValidation=False ignored when pressing Enter on the button within a control with DefaultButton (ctrlaltca) NEW: Issue #83 - PHP configuration style (Carl) ENH: Issue #106 - TJavaScript::jsonEncode and TJavaScript::jsonDecode should use built-in PHP functions (ctrlaltca) ENH: Issue #173 - Add "dragdropextra" (supergsting) patch, mouse coordinates and key status to drag & drop controls (Christophe, DevWorx) diff --git a/framework/Web/Javascripts/source/prado/controls/controls.js b/framework/Web/Javascripts/source/prado/controls/controls.js index 43dd889e..9dadff18 100644 --- a/framework/Web/Javascripts/source/prado/controls/controls.js +++ b/framework/Web/Javascripts/source/prado/controls/controls.js @@ -210,7 +210,9 @@ Prado.WebUI.DefaultButton.prototype = { var enterPressed = Event.keyCode(ev) == Event.KEY_RETURN; var isTextArea = Event.element(ev).tagName.toLowerCase() == "textarea"; - if(enterPressed && !isTextArea) + var isValidButton = Event.element(ev).tagName.toLowerCase() == "input" && Event.element(ev).type.toLowerCase() == "submit"; + + if(enterPressed && !isTextArea && !isValidButton) { var defaultButton = $(this.options['Target']); if(defaultButton) -- cgit v1.2.3