Skip to content

Commit

Permalink
fix(slider): apply "handle.highlight = true" when using the keyboard …
Browse files Browse the repository at this point in the history
…to interact with handles
  • Loading branch information
Westbrook committed Jun 11, 2021
1 parent e5810a9 commit 94e6349
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/slider/src/HandleController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,12 @@ export class HandleController implements Controller {
this.requestUpdate();
};

private onInputKeydown = (event: Event): void => {
const input = event.target as InputWithModel;
input.model.handle.highlight = true;
this.requestUpdate();
};

private dispatchChangeEvent(
input: HTMLInputElement,
handle: SliderHandle
Expand Down Expand Up @@ -446,6 +452,7 @@ export class HandleController implements Controller {
@change=${this.onInputChange}
@focus=${this.onInputFocus}
@blur=${this.onInputBlur}
@keydown=${this.onInputKeydown}
.model=${model}
/>
</div>
Expand Down

0 comments on commit 94e6349

Please sign in to comment.