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

IconMenu Popover position is wrong after page zoom on iOS deviced #9802

Closed
1 task done
stas-lesiuk opened this issue Jan 9, 2018 · 5 comments
Closed
1 task done
Labels
component: Popover The React component. duplicate This issue or pull request already exists

Comments

@stas-lesiuk
Copy link

stas-lesiuk commented Jan 9, 2018

  • I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

Menu's popover position after zoom is the same as in case no zoom was performed.

Current Behavior

The position of popover is awkward on iOS devices.

Steps to Reproduce (for bugs)

Issue could be reproduced on material-ui official website, on IconMenu component subpage:
http://www.material-ui.com/#/components/icon-menu
Seems to be reproducible for material-ui v1 as well:
https://material-ui.com/demos/menus/#max-height-menus

  1. Open page on iOS device.
  2. Click on IconMenu, popover position should be good.
  3. Zoom page, click on IconMenu again, the popover position will be awkward (as on the screen attached).
  4. If Popover position is normal, zoom page more or less and repeat step 3.

Attaching screenshots for conveniece:
initial
zoomed

Context

We're going to implement 508 compliance in future and there is a requirement saying page should remain usable after 6x or even 8x zoom.

Your Environment

Issue is related to iOS devices only, works good on Android.
Tested on iPhone 8 and iPad, on both Chrome and Safari.

Tech Version
browser Chrome, Safari
OS iOS
@stas-lesiuk
Copy link
Author

@oliviertassinari, I'm not sure whether tag v0.x is applicable to issues that do relate ONLY to v0 (and not to v1), or just to mark that they relate to v0.x, so just a quick note - issue is reproducible on v1 as well and the link to material-ui-next is attached.

@oliviertassinari
Copy link
Member

@stas-lesiuk Any clue on how we can improve the situation?

capture d ecran 2018-01-10 a 00 00 12

@oliviertassinari oliviertassinari added new feature New feature or request component: Popover The React component. labels Jan 9, 2018
@stas-lesiuk
Copy link
Author

@oliviertassinari I don't have a solution, but it looks like the problem relates to getAnchorPosition method in Popover.js, it already has some iOS-specific logic, but looks like it doesn't calculate offset properly when zoomed. A similar issue seems to be described in #4638 (comment), but it was rather about general iOS offset calculations that the after zoom ones.

img_0064

@Vishal-Upforcetech
Copy link

Also reproducible on Chrome Desktop.

At zoom = 0.7
image

Actual without zoom:
image

@oliviertassinari oliviertassinari added bug 🐛 Something doesn't work and removed new feature New feature or request labels Sep 30, 2019
@oliviertassinari oliviertassinari added duplicate This issue or pull request already exists and removed bug 🐛 Something doesn't work component: Popover The React component. labels Nov 30, 2019
@oliviertassinari
Copy link
Member

I'm closing as a duplicate of #17636.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: Popover The React component. duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants