nikolai-cc / svu

Svelte development, supercharged.
https://svu.vercel.app
MIT License
39 stars 3 forks source link

Copy from textarea does not work #6

Closed phenomen closed 2 years ago

phenomen commented 2 years ago

I've tried a couple of ways but none copies the content of textarea. copy works fine with other elements (div, p, pre, etc).

<textarea
id="copyArea"
bind:value={fixedCopy}
/>
<textarea
id="copyArea">
{fixedCopy}
</textarea>
<button use:copy={'#copyArea'}> Copy </button>
nikolai-cc commented 2 years ago

Thanks for filing! I'll take a look at it asap 🙂

nikolai-cc commented 2 years ago

I have just pushed a fix for this! Both methods should work in /svu version 0.1.5 😊