aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Sutherland2014-02-25 14:55:23 +1000
committerDavid Sutherland2014-02-25 14:55:23 +1000
commitdecf92eb045a269e69604ef4650d297faceea162 (patch)
tree4436625c22aaaf1ec4802f7a7acd7a049bbd2a47
parent06c3824c031d19013a4db8f844c503ab8e6b80ea (diff)
downloaddjango-debug-toolbar-decf92eb045a269e69604ef4650d297faceea162.tar.bz2
Propagate mouseup events when not dragging toolbar
In Chrome (this does not affect Firefox) onchange events on multi-selects are not fired all of the time e.g. with the following template: <body> <select multiple="multiple" onchange="console.log('clicked');"> <option value="1">1</option> </select> </body> Ctrl click on the option and view the js log. many of the events will not register. Therefore stop propagation and prevent default action only when handle is dragged.
-rw-r--r--debug_toolbar/static/debug_toolbar/js/toolbar.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/debug_toolbar/static/debug_toolbar/js/toolbar.js b/debug_toolbar/static/debug_toolbar/js/toolbar.js
index 126f399..cb40205 100644
--- a/debug_toolbar/static/debug_toolbar/js/toolbar.js
+++ b/debug_toolbar/static/debug_toolbar/js/toolbar.js
@@ -160,8 +160,8 @@
setTimeout(function () {
djdt.handleDragged = false;
}, 10);
+ return false;
}
- return false;
});
$(document).bind('close.djDebug', function() {
// If a sub-panel is open, close that