Skip to content

Commit f9c6533

Browse files
authored
Prevent scrolling when focusing on canvas (#109)
1 parent 6a15e5f commit f9c6533

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

js/lib/widget.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ export class RemoteFrameBufferView extends DOMWidgetView {
240240
// This is what makes the JS PointerEvent so great. We can enable mouse capturing
241241
// and we will receive mouse-move and mouse-up even when the pointer moves outside
242242
// the element. Best of all, the capturing is disabled automatically!
243-
that.focus_el.focus();
243+
that.focus_el.focus({ preventScroll: true, focusVisble: false });
244244
that.img.setPointerCapture(e.pointerId);
245245
that._pointers[e.pointerId] = e;
246246
let event = create_pointer_event(that.img, e, that._pointers, 'pointer_down');

0 commit comments

Comments
 (0)