Skip to content

Commit d177aef

Browse files
djsuthoaaugustin
authored andcommitted
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.
1 parent e49340d commit d177aef

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

debug_toolbar/static/debug_toolbar/js/toolbar.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,7 @@
139139
// cursor really moved. Otherwise, it will be impossible to expand the toolbar
140140
// due to djdt.handleDragged being set to true.
141141
if (djdt.handleDragged || event.pageY != startPageY) {
142-
var offset = handle.offset();
143-
offset.top = baseY + event.pageY;
144-
handle.offset(offset);
142+
handle.offset({top: baseY + event.pageY});
145143
djdt.handleDragged = true;
146144
}
147145
});

0 commit comments

Comments
 (0)