mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2025-02-23 05:42:01 +01:00
Fix weird scrolling when using a pen (#588)
With a pen, typing on a browser page, waiting a short moment, and then moving the pen scrolls the page. Call event.preventDefault() to disable this default behaviour for events in the canvas area.
This commit is contained in:
parent
367e7f7065
commit
8eeca90d55
@ -372,7 +372,7 @@ class ImageEditor {
|
||||
var y = (touch.clientY || 0) - bbox.top
|
||||
}
|
||||
}
|
||||
|
||||
event.preventDefault()
|
||||
// do drawing-related stuff
|
||||
if (type == "mousedown" || (type == "mouseenter" && event.buttons == 1)) {
|
||||
if (this.dropper_active) {
|
||||
@ -489,4 +489,4 @@ document.getElementById("init_image_button_draw").addEventListener("click", () =
|
||||
})
|
||||
document.getElementById("init_image_button_inpaint").addEventListener("click", () => {
|
||||
document.getElementById("image-inpainter").classList.toggle("active")
|
||||
})
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user