Skip to content

Fix input focus issue in Select component #644

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 17, 2023
Merged

Fix input focus issue in Select component #644

merged 1 commit into from
Nov 17, 2023

Conversation

524c
Copy link
Contributor

@524c 524c commented Nov 7, 2023

Fixes a crash when trying to read a property of an undefined value.

Select.svelte:457 Uncaught TypeError: Cannot read properties of undefined (reading 'focus')
    at HTMLInputElement.handleFocus (Select.svelte:457:15)
    at onScanElements (focusTrap.js:31:27)
    at focusTrap (focusTrap.js:37:5)
    at Object.mount [as m] (Modal.svelte:145:40)
    at Object.mount [as m] (Modal.svelte:137:19)
    at Object.update [as p] (Modal.svelte:136:28)
    at update (scheduler.js:119:30)
    at flush (scheduler.js:79:5)
handleFocus @ Select.svelte:457
onScanElements @ focusTrap.js:31
focusTrap @ focusTrap.js:37
mount @ Modal.svelte:145
mount @ Modal.svelte:137
update @ Modal.svelte:136
update @ scheduler.js:119
flush @ scheduler.js:79
Promise.then (async)
schedule_update @ scheduler.js:20
make_dirty @ Component.js:81
(anonymous) @ Component.js:139
(anonymous) @ Modal.svelte:46
set @ index.js:56
update @ index.js:69
trigger @ stores.js:41
(anonymous) @ +page.svelte:160
handleModal @ +page.svelte:149
click_handler_1 @ +page.svelte:417

Copy link

vercel bot commented Nov 7, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
svelte-select ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 7, 2023 0:39am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants