Skip to content

Commit 7b56c69

Browse files
committed
Handle disabled and readonly
1 parent c828032 commit 7b56c69

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/uui-input-color/lib/uui-input-color.element.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ export class UUIInputColorElement extends UUIInputElement {
4444
}
4545

4646
#onColorClick() {
47+
if (this.disabled || this.readonly) {
48+
return;
49+
}
4750
this._colorPicker.click();
4851
}
4952

@@ -97,8 +100,7 @@ export class UUIInputColorElement extends UUIInputElement {
97100
padding: var(--uui-size-1);
98101
}
99102
100-
uui-color-swatch:not([disabled]),
101-
uui-color-swatch:not([readonly]) {
103+
uui-color-swatch:not([disabled], [readonly]) {
102104
cursor: pointer;
103105
}
104106

0 commit comments

Comments
 (0)