-
Notifications
You must be signed in to change notification settings - Fork 3.4k
md-select with div wrap content with fixed position and 100% width #2330
Comments
Could anyone shed some light why position:fixed is set to some parent element? |
I think reason is when md-select is open, it disables unwanted scrolling on background. To solve this issue with div's position will be maybe add correct left, right values depends on if the sidenav is open or not and remove 100% width for that div. In demo of md-select this problem is hidden, because the demo docs container has max-width, when you remove max-width, open md-select, you will see that div has width of viewport (width: 100%), but you need width of your content, not of your "viewport" width, because you have sidenav, paddings etc. |
I think that whatever original problem is, different solution is needed. Atleast for desktops, 1900px wide overlay is not feasible in any scenario Edit: Thanks, I'll try setting max width for it. |
I agree with different solution. |
For anyone else looking for solution for this, you can use my fork where this behavior is removed. |
I'm using the master branch, but the issue still remained. @rschmukler I think there is problem with scrollbar in desktop browser, when md-select is open the DIV which cover md-content has max-width of md-content but it doesn't count with the width of scrollbar. |
How to increase the width of the md-select for some particular elements in the appalication. |
When md-select is open and layout has sidenav, wrap div with position: fixed;. width: 100%; exceeds from viewport..
When md-content contains elements with relative width it is problem.
md-content is 1243px wide, the div with position fixed has full width of viewport, but it needs full width of vp - sidebar width to solve this issue.
Maybe it's same issue like #2307
The text was updated successfully, but these errors were encountered: