-
Notifications
You must be signed in to change notification settings - Fork 3.4k
autocomplete: shows dropdown on top even when there is no room #10859
Comments
I have a work around for the last point (winodw is scrolling to top after closing drop down) Issue : Another issue reproduced on FF and IE only - after closing the dropdown the window is scrolled to the window top.
|
If you want to open options list always downwards, this is the workaround we have up to now. open angular-material.js file change shouldOpenAroundTarget to True,
|
Another effective workaround is to simply use |
The window jumping to the top on selection has been fixed. Updated CodePen showing the fix in 1.1.7. But the popup is still displaying on top, even when there is no room on the screen to display it. It also disables the window's scroll, so you can't scroll up without closing the popup. If a hard coded |
in which release we can expect this issue fix, because I'm facing a similar issue like this in IE11 browser. |
@Suvarnni we would like to get it into 1.1.12. If you are interested in taking a shot at fixing it, I can help review your PR. |
Hi @Splaktar, I'm facing the same issue. When can we expect this to be fixed? |
@marosoft thank you for looking into that. The fix looks good to me. Please submit a PR. |
Don't use the bounding rectangles of a document body to determine the position of the dropdown. Top and bottom values of the snap element are relative to the viewport, which is enough to decide about the position of the dropdown. Fixes angular#10859
Don't use the bounding rectangles of a document body to determine the position of the dropdown. Top and bottom values of the snap element are relative to the viewport, which is enough to decide about the position of the dropdown. Fixes #10859
Actual Behavior:
What is the issue? *
Sometimes the autocomplete dropdown will be shown at the
top
of an input, partially out of the screen, but it should bebottom
position in this case.CodePen (or steps to reproduce the issue): *
CodePen Demo which shows your issue:
https://codepen.io/dumchikov/pen/zdRrYOSteps to reproduce
md-autocomplete
should not havemd-dropdown-position
(position should be determined automatically)md-autocomplete
's input should be placed below the screen, so the window should be scrolled to see the input.md-autocomplete
's input gets the top of the windowAngularJS Versions: *
AngularJS Version:
1.5.5AngularJS Material Version:
1.1.4Additional Information:
Browser Type: *
Chrome, FF, IEBrowser Version: *
Chrome - 60.0.3112.90, FF - 54.0.1, IE - 11OS: *
Window 7Another issue reproduced on FF and IE only - after closing the dropdown the window is scrolled to the window top.
The text was updated successfully, but these errors were encountered: