Ennoriel/svelte-awesome-color-picker

Handler for on:blur?

Opened this issue · 1 comments

I'm a very happy user of this component, and I would like to contribute an on:blur handler. Is this something that would be welcomed?

I need it for my project where on:input changes the color in a preview while I'd like to save/commit with something like on:blur. Before I submitted a pull request, I wanted to make sure it would be welcomed/reviewed.

While it is possible to bind:isOpen, that forces me to keep track of which color picker opened/closed elsewhere. Having this handling done at the place of component declaration could simplify certain use cases.

Thank you for this wonderful library!

Thanks for your kind words about my library. :)

Go ahead with the feature, it's a really nice to have feature. ;)

I don't remember how this is done for on:input. Ideally it should fire the events from all the parts of the component.

I first thought that it should also work with the fallback HTML color input. However I don't think of a situation where a blur event would be useful if JavaScript broke!

Be noted that I won't be fast to review the PR (🏝️).