pull/1170/head
Cory LaViska 2023-01-26 14:22:04 -05:00
rodzic 223ef32b70
commit e8fe783fb4
2 zmienionych plików z 11 dodań i 1 usunięć

Wyświetl plik

@ -10,6 +10,7 @@ New versions of Shoelace are released as-needed and generally occur when a criti
- Fixed a bug in `<sl-animated-image>` where the play and pause buttons were transposed [#1147](https://github.com/shoelace-style/shoelace/issues/1147)
- Fixed a bug that prevented `web-types.json` from being generated [#1154](https://github.com/shoelace-style/shoelace/discussions/1154)
- Fixe a bug in `<sl-color-picker>` that prevented `sl-change` and `sl-input` from emitting when using the eye dropper [#1157](https://github.com/shoelace-style/shoelace/issues/1157)
## 2.0.0

Wyświetl plik

@ -563,7 +563,16 @@ export default class SlColorPicker extends ShoelaceElement implements ShoelaceFo
eyeDropper
.open()
.then(colorSelectionResult => this.setColor(colorSelectionResult.sRGBHex))
.then(colorSelectionResult => {
const oldValue = this.value;
this.setColor(colorSelectionResult.sRGBHex);
if (this.value !== oldValue) {
this.emit('sl-change');
this.emit('sl-input');
}
})
.catch(() => {
// The user canceled, do nothing
});