-
Notifications
You must be signed in to change notification settings - Fork 1.8k
ui-select with append-to-body="true" doesn't updates its position on window or container resize. #1254
Comments
+1 did you find a solution for this? |
+1 need a fix for this as well. Playing around with trying to bind the position of the body bound element with the placeholder created when opening the select. However, having trouble with the watch not updating...changes to the elements offset does not cause a digest cycle. |
Try out http://plnkr.co/edit/G02EbD?p=preview. I added a watch to the placeholder offset that updates the selects positioning. The only problem I can see right now is if the select is within a scrollable div and the user scrolls the placeholder outside of the div, the select is still visible. Works great for resizing and side scrolling. |
Just noting that positioning is a hard problem - this may best be solved by trying to split out the position module from UI Bootstrap and then using it here, as this is for the most part a solved problem in UI Bootstrap, along with all of the robust placement support present in the Bootstrap 3 library itself, including auto positioning. |
Had the same issue and I resolved it by setting |
This (not coincidentally) also happens when you scroll parent container div. |
@JimiC : I have set append-to-body="false", but it is hiding my dropdown menus now. |
@sumeetsonawane11 Two years after my answer may not apply anymore. |
I'm still encountering this issue when scrolled in the parent container. Will the fix be re-reviewed/updated or is this lib defunct? |
Issue: I have an ui-select element somewhere in container with the append-to-body attribute true, if I open the dropdown and resize the window the element will remain at the same position, fixed.
Fix needed: Update dropdown position on resize.
The text was updated successfully, but these errors were encountered: