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

Mobile Issue | spinner does not showing #106

Closed
ahsansalaldaha opened this issue Apr 23, 2019 · 5 comments
Closed

Mobile Issue | spinner does not showing #106

ahsansalaldaha opened this issue Apr 23, 2019 · 5 comments

Comments

@ahsansalaldaha
Copy link

  • vue-autosuggest version: 1.8.3
  • node version: v8.11.2
  • npm (or yarn) version: 5.6.0

What you did:
Implemented auto suggest in my project. working flawlessly except mobile.

What happened:

Spinner not showing after typing

Problem description:
Does not show the spinning after a user typed something unless he taps out of the field.

Suggested solution:
not sure

@darrenjennings
Copy link
Owner

@ahsansalaldaha there is no "spinner" bundled with vue-autosuggest so not sure what you mean. Can you please create a codesandbox to reproduce your issue?

You can fork this one: https://codesandbox.io/s/627qlx66oz

@rangermeier
Copy link

Not sure about the spinner (I guess some custom UI), but I can confirm that on-input-change does not fire on Chrome Android 73 while the input has focus. Only when the input loses focus on-input-change triggers. It works on Firefox Android though.

E.g. I use on-input-change to fetch search results from the backend while the user types. On Chrome Android the suggestions will only update after I click elsewhere on the page (then the event fires) and then focus the input again (the suggestions are shown).

You can test it with the official demo

@rangermeier
Copy link

rangermeier commented Apr 24, 2019

Some more insights: This is caused by vuejs/vue#9777 (comment)

On some mobile phones the keyboard is in composing mode while typing a word, which prevents v-model to fire.

If we want to get notified after each keystroke we'd have to use <input v-on:input="e => searchInput e.target.value" :value="searhcInput" />.

Not 100% sure as I don't have any experience with languages that use composition but I assume eager updating would be generally the desired behavior for an autosuggest widget.

@ahsansalaldaha
Copy link
Author

ahsansalaldaha commented Apr 24, 2019 via email

@darrenjennings
Copy link
Owner

This seems like a duplicate of #70. Please try beta version (which is very stable, just working on some more things before I release as 2.0 officially):

npm install [email protected]

this version removes internal v-model in favor of @input and :value as @rangermeier points out. Hopefully this helps:
https://codesandbox.io/s/2vr87nyvkp

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