xnimorz / svelte-input-mask

Input masking component for Svelte with simple API and rich customization
https://codesandbox.io/s/svelte-input-mask-demo-xurgr
102 stars 10 forks source link

Select on Focus #11

Open base2arthur opened 3 years ago

base2arthur commented 3 years ago

It would be good to have a select on focus as the inputEl is not exposed. function handleFocus(e) { canSetSelection = true; if(selectOnFocus){ inputEl && typeof inputEl.select === 'function' && inputEl.select() } dispatch('focus', e); }

xnimorz commented 3 years ago

Hi! Sorry for the long response, I'm not sure how it happened, that I didn't receive a notification to my bot. Yes, sure, it's a good idea. You're welcome to send a PR