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

Navigation Block: Menu close button doesn't work on mobile #37996

Closed
ryelle opened this issue Jan 14, 2022 · 8 comments · Fixed by #38032
Closed

Navigation Block: Menu close button doesn't work on mobile #37996

ryelle opened this issue Jan 14, 2022 · 8 comments · Fixed by #38032
Assignees
Labels
[Block] Navigation Affects the Navigation Block [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@ryelle
Copy link
Contributor

ryelle commented Jan 14, 2022

Description

When using a touch device (like a phone), the mobile menu close button doesn't close. It appears to trigger twice, so the menu closes and immediately re-opens.

I was able to reproduce this on the new wp.org News theme and the Twenty Twenty-Two demo, both use the navigation block.

Step-by-step reproduction instructions

  1. Go to either site listed above or a local site with a Navigation block
  2. Use a touch device, or switch to touch simulator on your browser
  3. Open the menu
  4. Try to close it

Screenshots, screen recording, code snippet

menu-close.mp4

Environment info

No response

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

No

@ryelle ryelle added [Type] Bug An existing feature does not function as intended [Block] Navigation Affects the Navigation Block labels Jan 14, 2022
@chthonic-ds
Copy link
Contributor

I believe #36837 was supposed to address the underlying cause of this behaviour.

@ryelle
Copy link
Contributor Author

ryelle commented Jan 15, 2022

It looks like that was released with v12.2 of Gutenberg, but I'm still able to replicate this on WP trunk + Gutenberg 12.3.2.

@carolinan
Copy link
Contributor

I can reproduce this using an android phone, with other themes than TT2, on Gutenberg 12.3.2 WordPress 5.9-RC2-52579 multisite.

@getdave
Copy link
Contributor

getdave commented Jan 17, 2022

I tested on the iOS simulator on 5.9-RC2-52579 both with and without Gutenberg 12.3.2 active on the TT1 theme and I was unable to replicate:

Screen.Capture.on.2022-01-17.at.14-34-20.mov

Also same for TT2 theme:

Screen.Capture.on.2022-01-17.at.14-35-22.mov

I'll see if I can try this on an Android somehow.

I was able to reproduce this on the new wp.org News theme and the Twenty Twenty-Two demo.

@ryelle
Copy link
Contributor Author

ryelle commented Jan 17, 2022

My screen recording was using an Android, so maybe this isn't an issue on iOS?

Continuing to debug, I can reproduce this on WordPress 5.9-beta2-52353 + Gutenberg trunk using Twenty Twenty-Two, with Firefox responsive mode + touch simulation enabled.

It looks like navigationToggleModal is called twice for the close button, once with a click event and once with a touchstart event.

Edit: The touchstart is on the close button, but the click is on the open button.

@ryelle
Copy link
Contributor Author

ryelle commented Jan 17, 2022

It looks like micromodal had a regression (see ghosh/Micromodal#488) which caused the issue in #36837 to reappear. I had version 0.4.9 of micromodal, updated locally to 0.4.10, and that seems to have fixed the issue again.

@ryelle
Copy link
Contributor Author

ryelle commented Jan 17, 2022

PR to update micromodal version: #38032

@hellofromtonya
Copy link
Contributor

Hey folks, PR #38032 was backported to Core for RC3 https://core.trac.wordpress.org/changeset/52598. Thank you everyone for contributing to fixing this issue 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Navigation Affects the Navigation Block [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants