From d177aefdf14be50f24aa376813cd467ee8d4cb18 Mon Sep 17 00:00:00 2001 From: David Sutherland Date: Fri, 18 Jul 2014 12:28:45 +1000 Subject: Keep the toolbar handle pinned to the side after drag event. Current behaviour: after handle is moved when the window width is resized the handled keeps its absolute position rather than sticking to the right side of the window. Handle position returns to normal on page reload. --- debug_toolbar/static/debug_toolbar/js/toolbar.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/debug_toolbar/static/debug_toolbar/js/toolbar.js b/debug_toolbar/static/debug_toolbar/js/toolbar.js index 9f8523c..de46c02 100644 --- a/debug_toolbar/static/debug_toolbar/js/toolbar.js +++ b/debug_toolbar/static/debug_toolbar/js/toolbar.js @@ -139,9 +139,7 @@ // cursor really moved. Otherwise, it will be impossible to expand the toolbar // due to djdt.handleDragged being set to true. if (djdt.handleDragged || event.pageY != startPageY) { - var offset = handle.offset(); - offset.top = baseY + event.pageY; - handle.offset(offset); + handle.offset({top: baseY + event.pageY}); djdt.handleDragged = true; } }); -- cgit v1.2.3