Limit mouse detection to primary button only

This commit is contained in:
MMP0 2023-08-22 17:19:26 +09:00
parent 0998256fc5
commit 96edfb560b
1 changed files with 6 additions and 0 deletions

View File

@ -66,6 +66,8 @@
parent.insertBefore(resizeHandle, rightCol);
resizeHandle.addEventListener('mousedown', (evt) => {
if (evt.button !== 0) return;
evt.preventDefault();
evt.stopPropagation();
@ -91,6 +93,8 @@
}
window.addEventListener('mousemove', (evt) => {
if (evt.button !== 0) return;
if (R.tracking) {
evt.preventDefault();
evt.stopPropagation();
@ -102,6 +106,8 @@
});
window.addEventListener('mouseup', (evt) => {
if (evt.button !== 0) return;
if (R.tracking) {
evt.preventDefault();
evt.stopPropagation();