Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

md-select with div wrap content with fixed position and 100% width #2330

Closed
jakubweber opened this issue Apr 15, 2015 · 7 comments
Closed

md-select with div wrap content with fixed position and 100% width #2330

jakubweber opened this issue Apr 15, 2015 · 7 comments
Assignees
Milestone

Comments

@jakubweber
Copy link

md-select

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-select2
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

@jakubweber jakubweber changed the title md-select with div wrap content with fixed width md-select with div wrap content with fixed position and 100% width Apr 15, 2015
@ThomasBurleson ThomasBurleson added this to the 0.9.0 milestone Apr 15, 2015
@FDIM
Copy link
Contributor

FDIM commented Apr 15, 2015

Could anyone shed some light why position:fixed is set to some parent element?

@jakubweber
Copy link
Author

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.

@FDIM
Copy link
Contributor

FDIM commented Apr 15, 2015

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.

@jakubweber
Copy link
Author

I agree with different solution.

@FDIM
Copy link
Contributor

FDIM commented Apr 16, 2015

For anyone else looking for solution for this, you can use my fork where this behavior is removed.
"angular-material": "https://github.com/FDIM/bower-material.git#master",

@jakubweber
Copy link
Author

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.

@avasanth
Copy link

How to increase the width of the md-select for some particular elements in the appalication.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants