hperrin / svelte-material-ui

Svelte Material UI Components
https://sveltematerialui.com/
Apache License 2.0
3.31k stars 285 forks source link

Checkbox does not emit focus event #547

Open tuckergordon opened 1 year ago

tuckergordon commented 1 year ago

Describe the bug Seems the <Checkbox> component does not actually emit the inner focus event.

To Reproduce Simple example REPL:

<Checkbox 
  on:focus={() => console.log('focused')} 
  on:click={() => console.log('clicked')} />

<script>
  import Checkbox from '@smui/checkbox';
</script>

Expected behavior Should emit the inner <input>'s focus event. I see <input on:focus in the component but seems like something else is blocking that event.

Desktop (please complete the following information):

Additional context Other events, such as click events, are emitted without issue.

MrHPotter commented 1 year ago

Adding on:blur={() => console.log('blurred')} shows that neither of the explicit Event forwardings work on the Checkbox component.