fix color selection

pull/838/head
Cory LaViska 2022-07-21 10:12:29 -04:00
rodzic d7e7ff6101
commit f34ffdac55
2 zmienionych plików z 3 dodań i 0 usunięć

Wyświetl plik

@ -11,6 +11,7 @@ _During the beta period, these restrictions may be relaxed in the event of a mis
## Next
- Changed the type of component styles from `CSSResult` to `CSSResultGroup` [#828](https://github.com/shoelace-style/shoelace/issues/828)
- Fixed a bug in `<sl-color-picker>` where using <kbd>Left<kbd> and <kbd>Right</kbd> would select the wrong color
- Fixed a bug in `<sl-tab-group>` where the divider was on the wrong side when using `placement="end"`
- Fixed a bug in `<sl-tab-group>` that caused nested tab groups to scroll when using `placement="start|end"` [#815](https://github.com/shoelace-style/shoelace/issues/815)
- Fixed a bug in `<sl-tooltip>` that caused the target to be lost after a slot change [#831](https://github.com/shoelace-style/shoelace/pull/831)

Wyświetl plik

@ -392,12 +392,14 @@ export default class SlColorPicker extends LitElement {
if (event.key === 'ArrowLeft') {
event.preventDefault();
this.saturation = clamp(this.saturation - increment, 0, 100);
this.lightness = this.getLightness(this.brightness);
this.syncValues();
}
if (event.key === 'ArrowRight') {
event.preventDefault();
this.saturation = clamp(this.saturation + increment, 0, 100);
this.lightness = this.getLightness(this.brightness);
this.syncValues();
}