mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-03-09 23:44:55 +08:00
Limit mouse detection to primary button only
This commit is contained in:
parent
0998256fc5
commit
96edfb560b
@ -66,6 +66,8 @@
|
|||||||
parent.insertBefore(resizeHandle, rightCol);
|
parent.insertBefore(resizeHandle, rightCol);
|
||||||
|
|
||||||
resizeHandle.addEventListener('mousedown', (evt) => {
|
resizeHandle.addEventListener('mousedown', (evt) => {
|
||||||
|
if (evt.button !== 0) return;
|
||||||
|
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
evt.stopPropagation();
|
evt.stopPropagation();
|
||||||
|
|
||||||
@ -91,6 +93,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
window.addEventListener('mousemove', (evt) => {
|
window.addEventListener('mousemove', (evt) => {
|
||||||
|
if (evt.button !== 0) return;
|
||||||
|
|
||||||
if (R.tracking) {
|
if (R.tracking) {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
evt.stopPropagation();
|
evt.stopPropagation();
|
||||||
@ -102,6 +106,8 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
window.addEventListener('mouseup', (evt) => {
|
window.addEventListener('mouseup', (evt) => {
|
||||||
|
if (evt.button !== 0) return;
|
||||||
|
|
||||||
if (R.tracking) {
|
if (R.tracking) {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
evt.stopPropagation();
|
evt.stopPropagation();
|
||||||
|
Loading…
Reference in New Issue
Block a user