From 2fb50129ade58889da44b0faee3c4349029c2c19 Mon Sep 17 00:00:00 2001 From: tpoisseau <22891227+tpoisseau@users.noreply.github.com> Date: Tue, 23 Jul 2024 11:56:36 +0200 Subject: [PATCH] fix: grabFocus from java preventScroll now Refs: https://github.com/cheminfo/openchemlib-js/issues/136 --- lib/canvas_editor/editor_area.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/canvas_editor/editor_area.js b/lib/canvas_editor/editor_area.js index c91112bc..31bbf672 100644 --- a/lib/canvas_editor/editor_area.js +++ b/lib/canvas_editor/editor_area.js @@ -34,7 +34,7 @@ class EditorArea { } // JSUIHelper methods grabFocus() { - this.canvasElement.focus(); + this.canvasElement.focus({preventScroll: true}); } setCursor(cursor) { this.canvasElement.style.cursor = this.cursorManager.getCursor(cursor);