-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(select): Fixes width-issue of select option panel in IE #11801
fix(select): Fixes width-issue of select option panel in IE #11801
Conversation
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. |
CLAs look good, thanks! |
Fixes the select options panel width not matching the select width in IE11 Fixes #11609
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The jump in the screen record you show is also present without the fix. If you set the width of the Do you want me to further improve the PR to also fix the jumping issue #11642? Or how do you want to proceed? |
If you know how to fix it, it would be good to fix both of them, otherwise it can be addressed later. Also is there a way to work around having to add an extra wrapper around the select panel? |
ok, I will see if I find a solution for that, too.
So far, I didn't find a way without adding additional markup (apart from using Or do you see any other solution? Unfortunately, it has alway been a pain using |
concerning #11642: the reason for the remaining jump of 32px at the end of the animation is the animation transition from this also happens when starting with an initial state of it seems that this is rather a bug in the angular animations itself, since e.g. I filed the following bug report: angular/angular#24545 Here is an example using Angular animations to animate the transition from Using CSS-animation does not work either (it works in chrome, however): https://codepen.io/macjohnny-zh/pen/RJLOWG In order to fix #11642, I see the following options: 1.) ignore the "little" jump for now, as this PR already reduced the jump in #11642 from "large" to "small", while still keeping the issue open to fix the little jump later @crisbeto how do you want to proceed? I suggest to get this PR ready to be merged and fix the little jump of #11642 in a separate PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@crisbeto thanks for reviewing the PR. However, IE would still get it wrong, now the panel being too large because the Hence I think the solution of having a |
Those waiting #11609 (comment) |
@tinayuangao @crisbeto any idea why this PR didn't make it into the |
The caretaker just hasn't gotten to it yet. |
@crisbeto @josephperrott @jelbourn I merged the current master and resolved the conflicts. |
In the effort of trying to run it through the tests of Google internal projects. I found this change made the option panel disappears much faster than before (if you slow the animation, you can see it clearly). It somehow changed the animation behavior and some tests seem very sensitive about the timing. |
@vivian-hu I will try to investigate the animation duration |
@vivian-hu I found that the panel leave animation was not rendered due to angular/angular#23302 |
@vivian-hu could you please have a look at this PR again? it should work correctly and resolve the issue. |
@crisbeto @vivian-hu @josephperrott I updated the PR with the fix suggested by @striky1 in #11609 (comment), which does not involve markup changes but only the following additional css property: .mat-select-panel {
flex: 1 0 auto;
} So now this PR should fix the issue with minimal changes, while it does not affect the appearance in e.g. Google Chrome. I also tested various widths of the panel and it seems alright, so this PR should be good to go. I hope this can get merged soon, as this issue has been around for quite a while. |
@crisbeto @vivian-hu @josephperrott any chance to get this change merged? it is small, fixes the still present IE11 issue with mat-select, is updated with the latest master, and passes all checks. |
Not sure why the |
I think because there was an issue with the animation, which was resolved then. But since the change was adapted to a css-only solution, it should be fine now. |
@crisbeto can you re-approve the now css-only solution? |
According to #11609 (comment) of @evoltafreak, the css-only solution fails in IE if the options are larger than the trigger width. So I reverted this branch to the markup-solution that (as far as I have tested it) is a working solution. I saved the css-only solution as a separate branch: |
@vivian-hu could you please have a look at this PR again? |
* fix(select): Fixes width-issue of select option panel in IE11 Fixes the select options panel width not matching the select width in IE11 Fixes #11609 * code cleanup * fix leave-animation of select panel not working due to angular/angular#23302
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Fixes the select options panel width not matching the select width in IE11
Fixes #11609.