Merge pull request #17330 from calixteman/issue17327
[Editor] Only focus the canvas for mouse events when drawing in the canvas
This commit is contained in:
commit
58316369e5
@ -660,8 +660,13 @@ class InkEditor extends AnnotationEditor {
|
|||||||
|
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
||||||
if (event.type !== "mouse") {
|
if (
|
||||||
this.div.focus();
|
event.pointerType !== "mouse" &&
|
||||||
|
!this.div.contains(document.activeElement)
|
||||||
|
) {
|
||||||
|
this.div.focus({
|
||||||
|
preventScroll: true /* See issue #17327 */,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
this.#startDrawing(event.offsetX, event.offsetY);
|
this.#startDrawing(event.offsetX, event.offsetY);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user