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

mat-menu disappears after opening on mobile Safari #13130

Open
adamdport opened this issue Sep 14, 2018 · 19 comments
Open

mat-menu disappears after opening on mobile Safari #13130

adamdport opened this issue Sep 14, 2018 · 19 comments
Labels
area: material/menu P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Comments

@adamdport
Copy link

Bug, feature request, or proposal:

Bug

What is the expected behavior?

Menus open and stay open until dismissed

What is the current behavior?

Menus open for a split second and then disappear

What are the steps to reproduce?

This is only on 7.0.0-beta.0, I need a starter stackblitz for that version. Any basic menu should reproduce it.

What is the use-case or motivation for changing an existing behavior?

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

7.0.0-beta.0

Is there anything else we should know?

The issue goes away if you use lazy rendering, ie. ng-template with matMenuContent.

@crisbeto
Copy link
Member

I wasn't able to reproduce it against our demo app on a device running iOS 11. You can fork this Stackblitz which is running the 7.0 beta. https://stackblitz.com/edit/angular-92bnjh-lzasmw

@adamdport
Copy link
Author

Thanks for the starter. You're right, I couldn't reproduce it at first with the example from the docs. A menu with enough items to need a scroll bar does the trick though:

https://stackblitz.com/edit/angular-92bnjh-8nxizv

Breaks on my iPhone 7 on iOS11, let me know if it's not broken for you and I'll dig deeper.

@adamdport
Copy link
Author

...just found #11677, I guess mine's a duplicate?

@kaziupir
Copy link

Iphone 5s chrome/safari same problem

@jelbourn jelbourn added the needs: clarification The issue does not contain enough information for the team to determine if it is a real bug label Oct 4, 2018
@jelbourn
Copy link
Member

jelbourn commented Oct 4, 2018

Can anyone provide a reproduction?

@jelbourn jelbourn added the cannot reproduce The team is unable to reproduce this issue with the information provided label Oct 4, 2018
@adamdport
Copy link
Author

adamdport commented Oct 22, 2018

Can anyone provide a reproduction?

Sorry for the late response. I already posted a demo app that reproduces it. It looks like the "preview" function of stackblitz blows up on safari, so here's a direct link to the app that you can click from an iOS device: https://angular-92bnjh-8nxizv.stackblitz.io

As I said, it's on iOS11, it doesn't appear to be an issue on iOS12 (just released on the 17th). Angular Material supports the most recent two versions though, so it should be fixed. Thanks.

Edit: If you're testing it from a plus device, your screen might be big enough that it doesn't scroll (or break). You can either turn your device sideways or edit it to have more menu items

@crisbeto
Copy link
Member

I think it may have less to do with the iOS version and more to do with the animation. I believe somebody else posted a similar issue where they said that it's not an issue in Material 7.0 since we use a much simpler animation.

@adamdport
Copy link
Author

adamdport commented Oct 22, 2018

I tested the same link on two devices, one running iOS11 and the other iOS12. It worked on 12 and not 11. You gave me the starter stackblitz which uses Material 7 (albeit beta). So I guess this is a different issue?

@crisbeto
Copy link
Member

I'm mostly guessing since I unable to reproduce it on my iOS11 device.

@adamdport
Copy link
Author

You're using an actual device, not an emulator right? Here are some more details on my device, I'd be happy to provide any more details you think might be related:

  • iPhone 6s 64GB Space Gray (AT&T) MKQ92LL/A
  • Version 11.1.2 (15B202)
  • Safari browser

@adamdport
Copy link
Author

I was also successful at reproducing it in an iPhone 6s simulator running iOS 11.1.

@adamdport
Copy link
Author

And also in an iPhone 6s simulator running iOS 11.4. Can you try either of those?

@jarmandoh
Copy link

jarmandoh commented Jul 22, 2019

problem is in OS not navigator "for me", all navigators run right, repeat "for me" in windows and android, even on macOS, but in Iphone does not work.

@am-awais
Copy link

any update!
same issue only in latest safari browser

@BovineEnthusiast
Copy link

Same issue here. Looks like it always works on the third click.

ezgif com-video-to-gif

@jelbourn jelbourn added P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent and removed cannot reproduce The team is unable to reproduce this issue with the information provided needs: clarification The issue does not contain enough information for the team to determine if it is a real bug labels Dec 17, 2019
@jimmykane
Copy link

Hi this is a common issue plaguing iOS. you want a running app to reproduce this ?

@jimmykane
Copy link

Also it looks that happens with menus positioned closed to the edges of the screen

@Hanawa02
Copy link

Hi, same happens for my app. On the third click the menu stays open.

The bug only happens on iOs Phone, be it the installed app or the safari, simulators can't reproduce the problem.

My Project main Dependencies:
image

@greg-larson
Copy link

This is happening for me also and can be repoduced in the simulator.
iOS 12.4
iPhone 5s

Need to click 3 times to keep the menu open.
On angular / material 10.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: material/menu P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Projects
None yet
Development

No branches or pull requests