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

mdSelect: width is incorrect with layout-column and flex #5291

Closed
mckenzielong opened this issue Oct 21, 2015 · 0 comments
Closed

mdSelect: width is incorrect with layout-column and flex #5291

mckenzielong opened this issue Oct 21, 2015 · 0 comments
Assignees
Milestone

Comments

@mckenzielong
Copy link
Contributor

mdSelect sets an incorrect min-width when flex and layout column are set on the md-select-menu-container div. See this codepen for an example. On the first click, the md-content will also have an incorrect min-width, but will be correctly set on subsequent clicks.

Additionally, shrinking the width of the window size while the select menu is open, and then scaling back up will cause the min-width set on the md-content to become incorrect.

Probably related to this calculation: minWidth = targetRect.width + centeredRect.paddingLeft + centeredRect.paddingRight;. It also seems like calculateMenuPositions should actually update the min-width set on the md-content node?

 if (shouldOpenAroundTarget) {
        contentNode.style['min-width'] = targetRect.width + 'px';
 }
//shouldOpenAroundTarget = false.

Browser: Chrome 45, Opera 32
Version 1.0 rc-1
Demo: http://codepen.io/mckenzielong/pen/RWxvoW
Related: didn't see anything when I searched, lots of closed items related to sizing issues though.

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

3 participants