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
(md-select) with placeholder changes size when selected #3073
An md-select with a selection should be the same size as with no selection
What is the current behavior?
This is true for an md-select with no placeholder, but when I provide a placeholder, the control sizes differently
As a side note - can anybody comment on why the second controls placeholder overlaps with the control above, when selected? Is this a bug which should be filed separately?
What are the steps to reproduce?
Select a value in both of the lists, and you'll see an offset
changed the title [-]bug - md-select with placeholder changes size when selected[/-][+](md-select) with placeholder changes size when selected[/+]on Feb 12, 2017
When removing this line it works fine, but I'm not sure about the side effects of that.
EDIT:
The comment above the method says "Must set the width of the selected option's value [...]", but the width is added to <span class="mat-select-placeholder"> instead of <span class="mat-select-value"> which would fit to the comment. I'm not sure if this is needed anymore, because without setting it explicitly it works fine at least in Chrome.
Activity
[-]bug - md-select with placeholder changes size when selected[/-][+](md-select) with placeholder changes size when selected[/+]dahaupt commentedon Feb 12, 2017
@benb7760 To answer your second question: This issue is already known and will be fixed soon with #2309.
dahaupt commentedon Feb 12, 2017
This is because of this method in
select.ts:When removing this line it works fine, but I'm not sure about the side effects of that.
EDIT:
The comment above the method says "Must set the width of the selected option's value [...]", but the width is added to
<span class="mat-select-placeholder">instead of<span class="mat-select-value">which would fit to the comment. I'm not sure if this is needed anymore, because without setting it explicitly it works fine at least in Chrome.dahaupt commentedon Feb 17, 2017
To fix this temporary you can use:
jelbourn commentedon Jun 6, 2017
Tracking via #2124
angular-automatic-lock-bot commentedon Sep 5, 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.