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();
|
||||
|
||||
if (event.type !== "mouse") {
|
||||
this.div.focus();
|
||||
if (
|
||||
event.pointerType !== "mouse" &&
|
||||
!this.div.contains(document.activeElement)
|
||||
) {
|
||||
this.div.focus({
|
||||
preventScroll: true /* See issue #17327 */,
|
||||
});
|
||||
}
|
||||
|
||||
this.#startDrawing(event.offsetX, event.offsetY);
|
||||
|
Loading…
Reference in New Issue
Block a user