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

Menus don't work on mobile #22

Closed
ioquatix opened this issue Jan 12, 2020 · 1 comment · Fixed by #31
Closed

Menus don't work on mobile #22

ioquatix opened this issue Jan 12, 2020 · 1 comment · Fixed by #31

Comments

@ioquatix
Copy link
Owner

ioquatix commented Jan 12, 2020

Not sure what is the best approach. If we make the top level <span> into <a> will the :hover selector work?

Otherwise, maybe we need to use some JavaScript to make it work better on mobile.

cc @courtneycb @JackMorganNZ @huba

@pyrmont
Copy link
Contributor

pyrmont commented Jan 12, 2020

@ioquatix It's buried in a footnote for the Safari on iOS listing in the compatibility table of the MDN page on :hover but tapping on elements won't trigger a :hover state in Safari on iOS unless that element is 'clickable'. The MDN page on the click event explains that elements that are 'clickable' are typically 'interactive' (e.g. <a> elements).

There are workarounds to make 'non-interactive' elements exhibit the same behaviour. The simplest (to my mind) is to set cursor: pointer; on the element (or any of its ancestors). The MDN page linked above lists some of the other options.

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

Successfully merging a pull request may close this issue.

3 participants