]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Fixed regression in bookmark.js that caused double-submits (jquery 2.x stuff)
authorMikael Nordfeldth <mmn@hethane.se>
Mon, 23 Sep 2013 10:07:37 +0000 (12:07 +0200)
committerMikael Nordfeldth <mmn@hethane.se>
Mon, 23 Sep 2013 10:07:37 +0000 (12:07 +0200)
In 6de3fc02173017f6fb46e8e86c87228c3d7237a0 bookmark.js was patched to
jquery 2.x (removed '.die' call) but unfortunately the 'submit' event
was attached to an input element instead of a form element (which got
a 'click' event).

plugins/Bookmark/js/bookmark.js

index f86266133dd35c38844d22f52d760ddef48c7868..f5a547b4d75d4a37eab8a1e2c63f0fd2d7b238f8 100644 (file)
@@ -20,8 +20,8 @@ var Bookmark = {
 $(document).ready(function() {
 
     // Stop normal live event stuff
-    $(document).off("click", "form.ajax");
-    $(document).off("submit", "form.ajax input[type=submit]");
+    $(document).off("submit", "form.ajax");
+    $(document).off("click", "form.ajax input[type=submit]");
 
     // Make the bookmark submit super special
     $(document).on('submit', '#form_initial_bookmark', function (e) {