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

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

@mckenzielong

Description

@mckenzielong

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions