Skip to content
This repository was archived by the owner on Oct 2, 2019. It is now read-only.

Fix to recalculate top position of dropdown when shown upward #998

Closed
wants to merge 1 commit into from
Closed

Fix to recalculate top position of dropdown when shown upward #998

wants to merge 1 commit into from

Conversation

ischenkodv
Copy link

When dropdown is opened in upward direction and I begin to type something so that there are just a couple of elements visible then dropdown appears high above the field. Here is the screnshot:
up_direction_height_bug

And plunker to see the bug: http://plnkr.co/edit/283bzy?p=preview (type something in the bottom field but note that it could depend on window size, ensure that element is on the bottom).
Here is the plunkr with my fixed version of select.js: http://plnkr.co/edit/0rdvSM?p=preview

It seems that this bug was introduced in #836

I setup more $watch callbacks to recalculate top position of dropdown when $select.search and $select.selected variables are changed.

@arambert
Copy link

👍

@ManuelPutallaz
Copy link

(Y) thanks

+1 to this feature in the new version

@cdjackson
Copy link
Contributor

Just for information, I hadn't seen this PR, but have also submitted a fix in #1123. This fix is to reduce code and add the changes directly into the css classes which I think is a better approach than adding watches and recalculating the sizes.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants