summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabio Bas <ctrlaltca@gmail.com>2016-02-20 12:20:54 +0100
committerFabio Bas <ctrlaltca@gmail.com>2016-02-20 12:20:54 +0100
commit55c7e9c4cd967620ec468309d18f41c53f23dfee (patch)
treed64d156eadf9c2a8494ccafbf13ad7eda96a9001
parent062d868e75d174fa566dea0c5b98444191b6d094 (diff)
Be more aggressive stopping events
Also, return false so that jQuery will know that the event has been stopped, too This fixes some special cases where <TButton Attributes.onClick=“return false;” /> caused a postback
-rw-r--r--framework/Web/Javascripts/source/prado/controls/controls.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/framework/Web/Javascripts/source/prado/controls/controls.js b/framework/Web/Javascripts/source/prado/controls/controls.js
index 3ff089c3..9eff6a1d 100644
--- a/framework/Web/Javascripts/source/prado/controls/controls.js
+++ b/framework/Web/Javascripts/source/prado/controls/controls.js
@@ -264,7 +264,11 @@ Prado.WebUI.PostBackControl = jQuery.klass(Prado.WebUI.Control, {
if(doPostBack && !jQuery(src).is(':disabled'))
this.onPostBack(options,event);
if(typeof(onclicked) == "boolean" && !onclicked)
+ {
event.stopPropagation();
+ event.preventDefault();
+ return false;
+ }
},
onPostBack : function(options, event)