This commit is contained in:
Cory LaViska
2023-01-26 14:22:04 -05:00
parent 223ef32b70
commit e8fe783fb4
2 changed files with 11 additions and 1 deletions

View File

@@ -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

View File

@@ -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
});