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 submenus not closing properly on iPad #54991

Closed
cuemarie opened this issue Oct 3, 2023 · 6 comments · Fixed by #55198
Closed

Navigation Block submenus not closing properly on iPad #54991

cuemarie opened this issue Oct 3, 2023 · 6 comments · Fixed by #55198
Labels
[Block] Navigation Affects the Navigation Block [Type] Bug An existing feature does not function as intended [Type] Regression Related to a regression in the latest release

Comments

@cuemarie
Copy link

cuemarie commented Oct 3, 2023

Description

Navigation Block submenus fail to close when you tap away from the submenu, or open others. Instead, they remain open, and can overlap each other.

Step-by-step reproduction instructions

  1. Set up a site with a Navigation Block containing submenus (it helps to create a couple dropdowns in the menu)
  2. Launch the site on an iPad or test environment for an iPad
  3. Explore opening submenus along the page and trying to close them without refreshing/navigating away from the page

Screenshots, screen recording, code snippet

Firefox Browser Responsive Tools

Screen.Capture.on.2023-10-02.at.17-19-29.mp4

BrowserStack with iPad 10th Generation > Safari

Screen.Capture.on.2023-10-02.at.17-25-49.mp4

Environment info

  • WP 6.3.1
  • Gutenberg 16.7.0

Also replicated on Gutenberg 16.6.0 and 16.5.1 (I didn't rebuild the block each time though - just switched between versions after building the navigation block on 16.7.0)

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

Yes

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

Yes

@annezazu annezazu added [Type] Bug An existing feature does not function as intended [Block] Navigation Affects the Navigation Block [Type] Regression Related to a regression in the latest release labels Oct 3, 2023
@annezazu
Copy link
Contributor

annezazu commented Oct 3, 2023

Adding this to 6.4 to be safe. I tried to replicate with 6.4 beta 2 and GB 16.7 but wasn't able to replicate when simulating an ipad environment for Chrome or Safari:

Screen.Recording.2023-10-03.at.3.09.12.PM.mov

@annezazu annezazu added the [Status] Needs More Info Follow-up required in order to be actionable. label Oct 3, 2023
@tellthemachines
Copy link
Contributor

tellthemachines commented Oct 10, 2023

I can reproduce this in the xcode simulator on a 10th gen iPad with iOS 17.0 on Safari:

Screenshot 2023-10-10 at 5 11 47 pm

On a Navigation with a Search block it's particularly bad 😬

Screenshot 2023-10-10 at 5 15 13 pm

Edit: I can also reproduce it in Safari on macOS Sonoma. Could just be an issue with the latest OS versions from Apple 🤔

@tellthemachines tellthemachines removed the [Status] Needs More Info Follow-up required in order to be actionable. label Oct 10, 2023
@tellthemachines
Copy link
Contributor

As far as I can tell the menus don't close because the aria-expanded attribute on the button element isn't being set to false (the CSS is attached to that attribute). I can't make out why this is happening though. The same attribute on the button-only Search block is working as expected. Cc @SantosGuillamot and @luisherranz as they are more familiar with this code.

@luisherranz
Copy link
Member

We'll take a look. Thanks, @tellthemachines.

@luisherranz
Copy link
Member

We've identified the problem, and @SantosGuillamot will open a PR with a possible fix.

@SantosGuillamot
Copy link
Contributor

I just created the pull request that aims to fix it: #55198

@luisherranz luisherranz linked a pull request Oct 11, 2023 that will close 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 [Type] Bug An existing feature does not function as intended [Type] Regression Related to a regression in the latest release
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

5 participants