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

[menu] iOS: tapping outside menu does not close it #5015

Closed
sorvell opened this issue Sep 27, 2023 · 1 comment
Closed

[menu] iOS: tapping outside menu does not close it #5015

sorvell opened this issue Sep 27, 2023 · 1 comment

Comments

@sorvell
Copy link
Collaborator

sorvell commented Sep 27, 2023

What is affected?

Component

Description

On iOS after tapping a menu to open it, tapping outside the menu does not close it. Tapping an item in the menu does close the menu.

Reproduction

  1. On iOS, go to https://material-web.dev/components/menu/, expand the interactive demo section, and tap one of the open menu butons.
  2. Tap outside the menu to close it.

Expected: the menu closes.
Actual: the menu remains open.

Workaround

N/A

Is this a regression?

No or unsure. This never worked, or I haven't tried before.

Affected versions

1.0

Browser/OS/Node environment

Browser: Safari
Platform: iOS 17

@sorvell sorvell changed the title [menu] iOS tapping outside menu does not close it [menu] iOS: tapping outside menu does not close it Sep 27, 2023
@e111077
Copy link
Contributor

e111077 commented Oct 5, 2023

Safari particularly on iOS will not bubble a click event up to window or body. I honestly don't have the mental fortitude for this

copybara-service bot pushed a commit that referenced this issue Oct 6, 2023
…or click

fixes #5036
fixes #5015

iOS has some really bad behaviors when it comes to clicking and focus. clicking on the body on a non-clickable item (like anything outside a menu) does not tirgger a click event that bubbles to menu. Also, clicking on a button does not cause it to be focused, thus depriving us of information on focusout's related target. Therefore we have to assume the anchor is the trigger.

PiperOrigin-RevId: 571227552
copybara-service bot pushed a commit that referenced this issue Oct 6, 2023
…or click

fixes #5036
fixes #5015

iOS has some really bad behaviors when it comes to clicking and focus. clicking on the body on a non-clickable item (like anything outside a menu) does not tirgger a click event that bubbles to menu. Also, clicking on a button does not cause it to be focused, thus depriving us of information on focusout's related target. Therefore we have to assume the anchor is the trigger.

PiperOrigin-RevId: 571227552
copybara-service bot pushed a commit that referenced this issue Oct 6, 2023
…or click

fixes #5036
fixes #5015

iOS has some really bad behaviors when it comes to clicking and focus. clicking on the body on a non-clickable item (like anything outside a menu) does not tirgger a click event that bubbles to menu. Also, clicking on a button does not cause it to be focused, thus depriving us of information on focusout's related target. Therefore we have to assume the anchor is the trigger.

PiperOrigin-RevId: 571227552
copybara-service bot pushed a commit that referenced this issue Oct 6, 2023
…or click

fixes #5036
fixes #5015

iOS has some really bad behaviors when it comes to clicking and focus. clicking on the body on a non-clickable item (like anything outside a menu) does not tirgger a click event that bubbles to menu. Also, clicking on a button does not cause it to be focused, thus depriving us of information on focusout's related target. Therefore we have to assume the anchor is the trigger.

PiperOrigin-RevId: 571227552
copybara-service bot pushed a commit that referenced this issue Oct 10, 2023
…or click

fixes #5036
fixes #5015

iOS has some really bad behaviors when it comes to clicking and focus. clicking on the body on a non-clickable item (like anything outside a menu) does not tirgger a click event that bubbles to menu. Also, clicking on a button does not cause it to be focused, thus depriving us of information on focusout's related target. Therefore we have to assume the anchor is the trigger.

PiperOrigin-RevId: 571227552
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants