In Svelte, events are setup using on:... syntax. So the correct way to setup a form would be:
<form on:submit={onSubmitHandler}>
<!-- inputs, etc -->
<calcite-button type="submit">Submit</calcite-button>
</form>
Because the "type" of the button is "submit", per #193 / #197, it should call our form on:submit handler.
When using calcite-button (with type="submit"), the svelte on:submit handler is not called.
When using calcite-button (with type="submit"), the svelte on:submit handler should be called.
git clone https://github.com/gavinr/calcite-components-svelte-form-submit-issuecd calcite-components-svelte-form-submit-issuenpm installnpm run devSee the live site here: https://gavinr.github.io/calcite-components-svelte-form-submit-issue/
This is similar to #381 (but for the Svelte framework instead of React)
This might just be because the button is in shadow dom.
Most helpful comment
https://www.hjorthhansen.dev/shadow-dom-and-forms/