You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Overlay supports repositioning upon resize / scroll #1430
@jelbourn almost all components that use overlay look broken because this doesn't work.. it seems like a pretty high priority thing to me. Do you want to work on this internally, or I can try and make a PR?
If you want to position an overlay relative to some static element whose only scrolling container is the document body, everything works great after scroll (example).
is not true anymore though, as md-overlay-container has position: fixed now
Stumbled upon this issue because I am trying to figure out why the MdDialog is position:static (changing to absolute fixes it...kind of). The overlay is on top of the dialog and the dialog is full width of the page (no width is declared in my config). Is this broken or do I need to do something to get it to work? I can fix it by adding display:flex and height: 100% to the .md-global-overlay-wrapper, but not sure if that is the correct way to go about it.
@jelbourn If menu is open indeed scroll is disabled. But only if you using mouse roller. But there are other options to scroll. For example by pressing up, down, pageUp, pageDown, home and end keys.
@jelbourn You mentioned this issue is replaced by 4093, which is "Overlay-based components should handle page scroll gracefully." I'm sure you're right, but I'm not understanding what to do to handle resize events (since this closed issue is called "Overlay supports repositioning upon resize / scroll"). Would you clarify for those like myself who were searching the internet for how to handle problems in angular cdk overlay when the user resizes the window? For example, I see a CloseScrollStrategy that will close the overlay as soon as the user starts scrolling. Is there such a thing for resize, like a CloseResizeStrategy? Or some other way to approach that problem?
There isn't anything that does resize automatically; we don't consider it to be as core of a use-case. The Material Design team did some user studies at some point and found that the only people who really resize their browser windows are web developers.
Reacted by Mateusz Gałganek, Marcus Reese and Michael S
For those looking for window:resize/ post attach change possition solution; there is now OverlayRef.updatePositionStrategy() which can be called before OverlayRef.updatePosition()
angular-automatic-lock-bot commented on Sep 10, 2019
Activity
fxck commentedon Nov 9, 2016
Any ETA on this?
fxck commentedon Nov 14, 2016
@jelbourn almost all components that use overlay look broken because this doesn't work.. it seems like a pretty high priority thing to me. Do you want to work on this internally, or I can try and make a PR?
jelbourn commentedon Nov 15, 2016
@fxck This is something we plan to work on- I have a specific approach in mind.
fxck commentedon Nov 18, 2016
and do you have it written down somewhere? @jelbourn
fxck commentedon Nov 30, 2016
@jelbourn this is such a pain in the ass.. can you please share what you have in mind so I can give it a shot?
Is it what's in https://docs.google.com/document/d/1jSMjkKSdzbQa2cuCeSFpzFAwDHr7xY4eqsXkfF6MeqA/preview or something else entirely?
Even this
is not true anymore though, as
md-overlay-containerhasposition: fixednowjelbourn commentedon Nov 30, 2016
It's mostly what's in the doc.
@crisbeto has been exploring the "disable scrolling" option in #1971 and @andrewseguin is already working on the repositioning.
mycarrysun commentedon Dec 12, 2016
Stumbled upon this issue because I am trying to figure out why the MdDialog is position:static (changing to absolute fixes it...kind of). The overlay is on top of the dialog and the dialog is full width of the page (no width is declared in my config). Is this broken or do I need to do something to get it to work? I can fix it by adding display:flex and height: 100% to the .md-global-overlay-wrapper, but not sure if that is the correct way to go about it.
crisbeto commentedon Dec 12, 2016
Try clearing your
node_modules@mycarrysun. There have been a few similar issues after the latest release.mycarrysun commentedon Dec 12, 2016
Hmm strange, it worked though! Thanks @crisbeto
k3nsei commentedon Jan 10, 2017
@jelbourn If menu is open indeed scroll is disabled. But only if you using mouse roller. But there are other options to scroll. For example by pressing up, down, pageUp, pageDown, home and end keys.
jelbourn commentedon Jan 27, 2017
#2703 adds this for tooltip. Once that is in, subsequent PRs can add this to menu and select.
aldo-roman commentedon Mar 30, 2017
Hi @jelbourn, any update on this issue? It's been 2 months now. Thanks!
jelbourn commentedon May 4, 2017
This issue is now replaced by #4093
marcusreese commentedon Apr 10, 2018
@jelbourn You mentioned this issue is replaced by 4093, which is "Overlay-based components should handle page scroll gracefully." I'm sure you're right, but I'm not understanding what to do to handle resize events (since this closed issue is called "Overlay supports repositioning upon resize / scroll"). Would you clarify for those like myself who were searching the internet for how to handle problems in angular cdk overlay when the user resizes the window? For example, I see a CloseScrollStrategy that will close the overlay as soon as the user starts scrolling. Is there such a thing for resize, like a CloseResizeStrategy? Or some other way to approach that problem?
jelbourn commentedon Apr 10, 2018
There isn't anything that does resize automatically; we don't consider it to be as core of a use-case. The Material Design team did some user studies at some point and found that the only people who really resize their browser windows are web developers.
marcusreese commentedon Apr 11, 2018
Okay, well I'll probably use @HostListener('window:resize') or fromEvent and in the callback do overlay.dispose();
AFDevMike commentedon Jan 17, 2019
For those looking for
window:resize/ post attach change possition solution; there is nowOverlayRef.updatePositionStrategy()which can be called beforeOverlayRef.updatePosition()angular-automatic-lock-bot commentedon Sep 10, 2019
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.