summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWill Holley <willholley@gmail.com>2014-02-28 15:07:13 +0000
committerWill Holley <willholley@gmail.com>2014-03-03 08:06:09 +0000
commitb22f2a48c48f3cfa9b4c082cfee87b76e8d44c37 (patch)
tree89ef8933dafa398759a387ecda60a3f8b3e80f23
parent72d61343b8b6edbfea3c9412bcc9edb1c246bf34 (diff)
downloadcouchdb-b22f2a48c48f3cfa9b4c082cfee87b76e8d44c37.tar.gz
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.
-rw-r--r--src/fauxton/app/addons/replication/views.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/fauxton/app/addons/replication/views.js b/src/fauxton/app/addons/replication/views.js
index 1b31a9d9e..a19e6098b 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;
}
});