From 32725721247553fcac93069298bd973f6de2b8c1 Mon Sep 17 00:00:00 2001 From: Ian Gilman Date: Wed, 14 Aug 2013 10:39:39 -0700 Subject: [PATCH] Clicking on a button control no longer refreshes page --- src/controldock.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/controldock.js b/src/controldock.js index 74857269..94d0c224 100644 --- a/src/controldock.js +++ b/src/controldock.js @@ -47,6 +47,12 @@ controls: [] }, options ); + // Disable the form's submit; otherwise button clicks and return keys + // can trigger it. + this.container.onsubmit = function() { + return false; + }; + if( this.element ){ this.element = $.getElement( this.element ); this.element.appendChild( this.container );