couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From deathb...@apache.org
Subject [02/12] couchdb commit: updated refs/heads/2128-autocomplete-section-name to 6e93561
Date Thu, 06 Mar 2014 21:32:09 GMT
Cancel event propagation on replication swap.

Previous implementation called e.preventDefault() but did not stop upwards
propagation - the click event would therefore trigger navigation to the main
database panel. jQuery calls preventDefault and stopPropagation
when false is returned from an event handler so just do that here.


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/b22f2a48
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/b22f2a48
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/b22f2a48

Branch: refs/heads/2128-autocomplete-section-name
Commit: b22f2a48c48f3cfa9b4c082cfee87b76e8d44c37
Parents: 72d6134
Author: Will Holley <willholley@gmail.com>
Authored: Fri Feb 28 15:07:13 2014 +0000
Committer: Will Holley <willholley@gmail.com>
Committed: Mon Mar 3 08:06:09 2014 +0000

----------------------------------------------------------------------
 src/fauxton/app/addons/replication/views.js | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/b22f2a48/src/fauxton/app/addons/replication/views.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/replication/views.js b/src/fauxton/app/addons/replication/views.js
index 1b31a9d..a19e609 100644
--- a/src/fauxton/app/addons/replication/views.js
+++ b/src/fauxton/app/addons/replication/views.js
@@ -175,7 +175,6 @@ function(app, FauxtonAPI, Components, replication) {
       this.startReplication(formJSON);
     },	
     swapFields: function(e){
-      e.preventDefault();
       //WALL O' VARIABLES
       var $fromSelect = this.$('#from_name'),
           $toSelect = this.$('#to_name'),
@@ -191,6 +190,9 @@ function(app, FauxtonAPI, Components, replication) {
 
       $fromInput.val(toInputVal);
       $toInput.val(fromInputVal);
+
+      // prevent other click handlers from running
+      return false;
     }
   });
 


Mime
View raw message