Skip to content

Commit

Permalink
fix: focus indicator on keyboard focus checkbox and switch
Browse files Browse the repository at this point in the history
  • Loading branch information
hperrin committed Apr 16, 2021
1 parent 30f9635 commit 219d146
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/checkbox/Checkbox.svelte
Expand Up @@ -8,6 +8,7 @@
removeClass,
addStyle,
active: rippleActive,
eventTarget: checkbox,
}}
class={classMap({
[className]: true,
Expand Down
3 changes: 3 additions & 0 deletions packages/switch/Switch.svelte
Expand Up @@ -21,6 +21,7 @@
addClass: addThumbUnderlayClass,
removeClass: removeThumbUnderlayClass,
// Don't need addStyle, since we don't set style prop.
eventTarget: checkbox,
}}
class={classMap({
'mdc-switch__thumb-underlay': true,
Expand All @@ -29,6 +30,7 @@
>
<div class="mdc-switch__thumb" />
<input
bind:this={checkbox}
use:useActions={input$use}
class={classMap({
[input$class]: true,
Expand Down Expand Up @@ -82,6 +84,7 @@
let element;
let instance;
let checkbox;
let internalClasses = {};
let thumbUnderlayClasses = {};
let nativeControlAttrs = {};
Expand Down

0 comments on commit 219d146

Please sign in to comment.