-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Append the list to body #41
Comments
Could you explain more and provide a plunker/jsfiddle to understand (+ version number and theme you are using), I'm definitly not a CSS geek :) |
I don't have a example to show you, but a simple fork of the existing demo will hopefully help explaining the problem (select something) if the list had been appended/moved to the body like select2 it would not be a problem |
+1 for this I have a More generic info on the issue: http://stackoverflow.com/questions/7074114/css-ignore-overflow-hidden |
Interesting solution there in the stackoverflow with just don't use any of But i have never liked the otherwise here is a quick dirty proposal http://plnkr.co/edit/FPQXQmxvfkMaRX64EUFv?p=preview |
here is another solution aswell: http://plnkr.co/edit/gAEbFYACuO7EV5SKARtj?p=preview the fixed list-width now inherits from the parent element (require a width on the select element) |
jimmywarting, thanks for the workaround. still, append-to-body would be welcomed. |
I would like to give it a try (appending the list to the body) but I'm too busy with other stuff :( |
+1 for this |
+1! for example useful in modals |
we bumped into this as well, any plans to implement it ? |
+1 for this too |
+1 on this too ... Can anyone provide a best guess of a time frame on 0.9.x release ? |
+1 for this as well. I've been using the |
@pabuisson Thanks for sharing the consequences of |
@jimmywarting Well I'm still looking into it. It seems the |
+1 for this |
1 similar comment
+1 for this |
@jimmywarting @pabuisson hmm looks like i am having the same problems with scrolling when using position: fixed. Did you guys come with any alternative solutions? I think I am going to have to go back to the normal select. All other solutions out there seem to have issues too. |
There seems to be little to no movement on this. I'm thinking the best (perhaps only) way to fix the issues around dropdowns and overflow content is to append the dropdown to the body element, and position it absolutely. My team and I are racing toward a deadline, and the UI relies on Does anyone have any recommendations/requirements, assuming EDIT I'll keep a list of requirements/features to implement here:
|
@jpdesigndev Why do you consider hiding dropdown on body scroll a requirement? This is not standard behavior for regular select dropdowns and I'm not sure why it should be implemented here. |
@drewbeck Well, that's what I've seen. Here's a quick breakdown (All latest browsers)
Given this small dataset, perhaps looking into disabling scrolling for everything other than the dropdown list is desirable. That could prove rather complex, I imagine. Thoughts? |
Thanks for that breakdown! I didn't know Windows Chrome was different. I wonder why that is? I think disallowing body scroll makes more sense, given these options. With 2-finger scroll it's easy to accidentally have your cursor in the wrong box — having the dropdown disappear in that case I think would be very frustrating. My ideal from a UX perspective would be that the dropdown scrolls with the browser. This isn't standard but I've seen it and I like it quite a bit more than the no-scroll case (see dropdowns on seamless.com for an example). It would be amazing to have this as an option. But disabling body scroll entirely would be consistent with most browsers and most users' experiences I believe. |
Disallow body scroll is going to be complex. Here's why: It's not always body that might be scrolling. Think about apps with many sections with I'll keep thinking about it, and put something together soon. We'll see how it goes. |
@jpdesigndev Yeah I hear you. The app I'm working on is exactly what you say: lots of scrolling sections. Select2 manages it by adding a "select2-drop-mask" div that spans the entire browser window and catches all scroll and click events. The dropdown div is on top of that. A possible solution here? |
This allows the dropdown to flow outside of the area it's 'contained' within. (For example, modals and scrollable content areas.) Related issues: angular-ui#308, angular-ui#234, angular-ui#206, angular-ui#41... And more! :-D Please do not merge this commit in its current state. :-)
This allows the dropdown to flow outside of the area it's 'contained' within. (For example, modals and scrollable content areas.) Related issues: angular-ui#308, angular-ui#234, angular-ui#206, angular-ui#41... And more! :-D Please do not merge this commit in its current state. :-)
…ive that moves the dropdown element to the end of the document body before opening it, thereby solving problems with the dropdown being displayed below elements that follow the `<ui-select>` element in the document. This implementation is modeled after the `typeahead-append-to-body` support from UI Bootstrap. See angular-ui#41 (and quite a few dupes).
I made PR #718 which just adds an I would appreciate testing, feedback, fixes, and so on. Specifically I have only been able to test the change with the Bootstrap theme on Angular 1.3.x with the latest version of Chrome, Firefox, Safari, and IE. It would be nice to get this feature into UI Select. |
Here is another PR that seems to solve this issue. #491 |
My hope is to see this fixed via #718. |
… moves the dropdown element to the end of the body element before opening it, thereby solving problems with the dropdown being displayed below elements that follow the `<ui-select>` element in the document. This implementation is modeled after the `typeahead-append-to-body` support from UI Bootstrap, but adds the whole select element to the body, not just the dropdown menu, which is needed for the Select2 theme. See angular-ui#41 (and quite a few dupes).
… moves the dropdown element to the end of the body element before opening it, thereby solving problems with the dropdown being displayed below elements that follow the `<ui-select>` element in the document. This implementation is modeled after the `typeahead-append-to-body` support from UI Bootstrap, but adds the whole select element to the body, not just the dropdown menu, which is needed for the Select2 theme. See angular-ui#41 (and quite a few dupes).
Closing as already implemented in the library, as documented here |
ha~ I fixed my bug. Thanks! |
I have a select in a div with overflow hidden/auto
In every (most?) usecase it's desirable to let the select go outside of the overflow element, like the native select and select2 dose)
Its true for all kind of typeahead, custom
<datalist>
polyfill thingsThe text was updated successfully, but these errors were encountered: