Skip to content
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

A weird input selection bug in Safari #1699

Closed
TehShrike opened this issue Aug 27, 2018 · 5 comments
Closed

A weird input selection bug in Safari #1699

TehShrike opened this issue Aug 27, 2018 · 5 comments

Comments

@TehShrike
Copy link
Member

REPL reproduction

In Safari (not Chrome or Firefox), whenever set is called, the selection in the focused input is reset, even if the value you're setting is unrelated to the input.

@TehShrike
Copy link
Member Author

@jacwright found it -

In the update method it has if (!input_updating) input.value = ctx.name; when it should be if (changed.name && !input_updating) input.value = ctx.name;

@TehShrike
Copy link
Member Author

(though I'm guessing 'name' in changed would be more proper)

@Conduitry
Copy link
Member

@TehShrike changed is just an object whose values are true, and isn't the new values - so we don't need to do 'name' in changed even if the new value is falsy.

@TehShrike
Copy link
Member Author

Oh hah! I forgot how changed worked.

@Rich-Harris
Copy link
Member

released 2.13.2, thank you!

TehShrike added a commit to TehShrike/spyfallx that referenced this issue Aug 28, 2018
Fixes sveltejs/svelte#1699 which was affecting the "change player name" input on the game screen on Safari
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

No branches or pull requests

3 participants