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

off canvas menu does not close when clicking outside menu on mobile safari on iOS #555

Open
level420 opened this issue Aug 16, 2019 · 1 comment

Comments

@level420
Copy link

level420 commented Aug 16, 2019

This is for:

T3 plugin v2.7.4
T3 blank template v2.2.8
joomla 3.9.11
iPhone 6 with iOS 12.4

Steps to reproduce the issue:

  1. Create an empty joomla website with the joomla sample data installed.
  2. Install T3 and template T3 blank and activate the off canvas menu in the T3 blank template settings
  3. Open the website on an iPhone using mobile safari
  4. Tap the off canvas burger menu
  5. Tap outside the off canvas menu e.g. in the grey background below the menu items
  6. The off canvas menu does not close as expected

This is due to the fact that mobile safari (in contrary to desktop safari) does not fire a click event for the body tag which is used in t3/base/js/off-canvas.js to trigger the menu close.

Solution:

For mobile safari the menu close handler should also be attached to the touchstart or the tap event, which is fired in this situation in mobile safari.

The fix is simple. I could offer a PR for this if appropriate.

level420 added a commit to level420/t3 that referenced this issue Aug 16, 2019
…menu on iOS

adds touchstart event listeners to the body
@level420
Copy link
Author

PR solving this issue: #556

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

1 participant