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);
|
||||
if (channel) control.input(channel, event);
|
||||
}
|
||||
function onChange(event: Event) {
|
||||
if (axis(event)) control.commit();
|
||||
}
|
||||
function onFocusin(event: FocusEvent) {
|
||||
const target = event.target as HTMLElement | null;
|
||||
if (!target) return;
|
||||
@@ -229,7 +232,7 @@ function onFocusout(event: FocusEvent) {
|
||||
@keydown="onKeydown"
|
||||
@keyup="control.keyup"
|
||||
@input="onInput"
|
||||
@change="control.commit"
|
||||
@change="onChange"
|
||||
@focusin="onFocusin"
|
||||
@focusout="onFocusout"
|
||||
@pointerdown="control.pointerdown"
|
||||
|
||||
Reference in New Issue
Block a user