diff options
| author | David Sutherland | 2014-07-18 12:28:45 +1000 |
|---|---|---|
| committer | Aymeric Augustin | 2014-07-26 22:25:13 +0200 |
| commit | d177aefdf14be50f24aa376813cd467ee8d4cb18 (patch) | |
| tree | 1a17e59119d8452946eaa835b3fa3f4bf22a7a51 | |
| parent | e49340d2e763b04d0fd1f1505394de835992a4d0 (diff) | |
| download | django-debug-toolbar-d177aefdf14be50f24aa376813cd467ee8d4cb18.tar.bz2 | |
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.
| -rw-r--r-- | debug_toolbar/static/debug_toolbar/js/toolbar.js | 4 |
1 files changed, 1 insertions, 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; } }); |
