fix: limit ColorArea change commits to native axes
This commit is contained in:
@@ -196,6 +196,9 @@ function onInput(event: Event) {
|
|||||||
const channel = axis(event);
|
const channel = axis(event);
|
||||||
if (channel) control.input(channel, event);
|
if (channel) control.input(channel, event);
|
||||||
}
|
}
|
||||||
|
function onChange(event: Event) {
|
||||||
|
if (axis(event)) control.commit();
|
||||||
|
}
|
||||||
function onFocusin(event: FocusEvent) {
|
function onFocusin(event: FocusEvent) {
|
||||||
const target = event.target as HTMLElement | null;
|
const target = event.target as HTMLElement | null;
|
||||||
if (!target) return;
|
if (!target) return;
|
||||||
@@ -229,7 +232,7 @@ function onFocusout(event: FocusEvent) {
|
|||||||
@keydown="onKeydown"
|
@keydown="onKeydown"
|
||||||
@keyup="control.keyup"
|
@keyup="control.keyup"
|
||||||
@input="onInput"
|
@input="onInput"
|
||||||
@change="control.commit"
|
@change="onChange"
|
||||||
@focusin="onFocusin"
|
@focusin="onFocusin"
|
||||||
@focusout="onFocusout"
|
@focusout="onFocusout"
|
||||||
@pointerdown="control.pointerdown"
|
@pointerdown="control.pointerdown"
|
||||||
|
|||||||
Reference in New Issue
Block a user