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

Add touchstart event for updating current index #210

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

tmazeika
Copy link

@tmazeika tmazeika commented Dec 14, 2020

What: Enabling touch simulation in Firefox's Responsive Design Mode, and in Firefox on Android (and possibly iOS), does not select the tapped suggestion item and put its content into the input.

Why: This fixes suggestion item selection in Firefox when used with a touchscreen.

How: There is a newly registered touchstart event handler that does the same thing as onMouseEnter to update the currently selected suggestion item index when a user taps the item. Additionally, touchstart and touchend events handlers are added to the document to make sure that touches select the item if the mouse events did not catch them.

Checklist:

  • Documentation
  • Tests
  • Ready to be merged
  • Added myself to contributors table

@tmazeika tmazeika marked this pull request as draft December 14, 2020 22:58
The last commit made the functionality work on Firefox Desktop's Responsive Design mode, but this one further fixes it on mobile, which the last commit did not do.
@tmazeika tmazeika marked this pull request as ready for review December 14, 2020 23:47
@tmazeika tmazeika marked this pull request as draft December 14, 2020 23:55
@tmazeika tmazeika marked this pull request as ready for review December 15, 2020 00:11
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.

None yet

1 participant