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

bug(overlay): overlays are sometimes blurred in Chrome #932

Closed
aminebizid opened this issue Jul 29, 2016 · 15 comments · Fixed by #1962
Closed

bug(overlay): overlays are sometimes blurred in Chrome #932

aminebizid opened this issue Jul 29, 2016 · 15 comments · Fixed by #1962
Assignees
Labels
P2 The issue is important to a large percentage of users, with a workaround

Comments

@aminebizid
Copy link

aminebizid commented Jul 29, 2016

I think you should change the text to "Use your eye glasses to see tooltips"

image

PS: My chrome zoom is set to 100%

@kherock
Copy link
Contributor

kherock commented Jul 31, 2016

+1

This is because the transforms on the parent .md-overlay are not integers, any way those can be rounded to the nearest pixel?

@ivoviz
Copy link

ivoviz commented Jul 31, 2016

Indeed, it would be nice to have them rounded.

@robertmesserle
Copy link
Contributor

@Zigzag95 Are there any specific steps or browser requirements to reproduce this?

@robertmesserle
Copy link
Contributor

robertmesserle commented Aug 1, 2016

Actually, we were able to recreate it only when using a Macbook Pro with a non-retina display on Chrome. Let me know if this happens under different circumstances as well.

@kherock
Copy link
Contributor

kherock commented Aug 1, 2016

ChromeOS (I'm going to assume that will include Linux) also has the issue. Can test on Windows soon.

@robertmesserle
Copy link
Contributor

Ah, okay. We tested on Linux and were not able to recreate it so far. Haven't checked Windows yet.

@ivoviz
Copy link

ivoviz commented Aug 1, 2016

@robertmesserle Although I've tested with the menu component, both Windows and Linux have this issue. I would assume the amount of blur also varies with ppi.

@robertmesserle
Copy link
Contributor

robertmesserle commented Aug 1, 2016

Yea, it should impact anything built on top of Overlay (ie. anything floating).

Some notes:

  • Rounding pixel values should fix some use-cases, but not all.
  • Percent-based translation will still cause blurring with no easy workarounds (at least not that we've found yet).

@robertmesserle robertmesserle changed the title tooltip flooding bug(overlay): overlays are sometimes blurred in Chrome Aug 2, 2016
@robertmesserle robertmesserle self-assigned this Aug 2, 2016
@gfaceless
Copy link

@robertmesserle Since currently transform is used only for overlay centering, maybe other centering technique should be used instead.

Getting rid of transform could also make animation more flexible

@jelbourn
Copy link
Member

Summing up status on this so far: this is caused by subpixel rendering in some browsers. Solution is to always round the transform values for overlay positions.

@jelbourn jelbourn added the P2 The issue is important to a large percentage of users, with a workaround label Oct 19, 2016
@jelbourn jelbourn self-assigned this Oct 19, 2016
@jelbourn
Copy link
Member

@quanterion
Copy link
Contributor

I think it may work for even numbers of width and height only

@kherock
Copy link
Contributor

kherock commented Oct 20, 2016

@jelbourn Some warning about using calc there, IE/Edge can't animate properties with it. That won't be an issue though if the .md-overlay's transform isn't being animated anyway.

@jelbourn jelbourn assigned crisbeto and unassigned jelbourn Nov 4, 2016
@jelbourn
Copy link
Member

jelbourn commented Nov 4, 2016

@crisbeto for connected position strategy, this should be as straightforward as calling Math.round on the translate values. For global position strategy, we may need to getBoundingClientRect after applying the percent translates and then reapply the rounded values (unless we can find a cleaner approach).

@crisbeto crisbeto removed the has pr label Nov 18, 2016
crisbeto added a commit to crisbeto/material2 that referenced this issue Nov 22, 2016
…ionStrategy

Refactors the `GlobalPositionStrategy` to use flexbox for positioning. This avoids the subpixel rendering issues that come with using transforms for centering.

Fixes angular#932.
crisbeto added a commit to crisbeto/material2 that referenced this issue Dec 2, 2016
…ionStrategy

Refactors the `GlobalPositionStrategy` to use flexbox for positioning. This avoids the subpixel rendering issues that come with using transforms for centering.

Fixes angular#932.
tinayuangao pushed a commit that referenced this issue Dec 2, 2016
…ionStrategy (#1962)

* fix(dialog): avoid subpixel rendering issues and refactor GlobalPositionStrategy

Refactors the `GlobalPositionStrategy` to use flexbox for positioning. This avoids the subpixel rendering issues that come with using transforms for centering.

Fixes #932.

* Make the `dispose` method required.

* Add extra comments regarding the flex wrapper.

* Fix failing unit tests.

* Fix the unit tests after the recent changes.
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P2 The issue is important to a large percentage of users, with a workaround
Projects
None yet
8 participants