Skip to content
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

Option list in overflow hidden container issue #44

Open
tjosseau opened this issue Aug 5, 2015 · 9 comments
Open

Option list in overflow hidden container issue #44

tjosseau opened this issue Aug 5, 2015 · 9 comments

Comments

@tjosseau
Copy link

tjosseau commented Aug 5, 2015

For instance, when the select input is inside an overflow:hidden container, the option list is hidden too. That looks normal, but it doesn't look as a default select option list behaviour.

Would it be possible to add an option in order to choose where the option list will be appended (such as body) ? Then it'll surely have to follow the input if it moves (as scrolling).
Like :

listParent : 'body'

or :

listParent : $('body')

P.S. : Tell me if you have no time to develop this, I could eventually make it.

@deronsizemore
Copy link

Sorry if this isn't a valid solution for your problem but I ran into this too yesterday. Can you not just remove overflow:hidden from the parent container?

@tjosseau
Copy link
Author

tjosseau commented Dec 5, 2015

Unfortunately no, as the container is a home-made window. And even if I set overflow:scroll, the select input wouldn't be shown on top of the window but still inside, needing to scroll to view it.

@deronsizemore
Copy link

Could you share the code you're working with? I could paste it into my project and maybe get a better look and see if I can come up with something as a work around.

@tjosseau
Copy link
Author

tjosseau commented Feb 2, 2016

Here is a sample of the issue we have here. https://jsfiddle.net/Totjoss/Lebsxcat/ I also added a could-be raw solution. ;)
P.S. : Sorry for the delay, I wasn't able to work on this before.

@deronsizemore
Copy link

Hmm... okay I see what you're working with now. I think you're actually having a different problem than I was having. My .sod_list wasn't showing any of the select options at all until I gave it a max-height. From there, that worked for me but that's obviously not the same problem you're seeing.

I'd probaly go with the last "could-be raw solution" and call it a day. Seems to work fine?

@tjosseau
Copy link
Author

Well, I think that could be a good approach, however it could be a bit tricky to setup, and maybe you could lose the simplicity of your way of managing selectors. It must be an option and not a default behaviour as it would be for a specific issue (just like my windows).

Again, sorry for the delay, but don't hesitate to send me a mail about it if you need help or a tester. :)

@deronsizemore
Copy link

Thanks again. Sure, if you're curious and want to test it, you can try it out live here: http://www.colorfavs.com. Specifically, you'll have to register for an account (I don't activate accounts so you can even use a fake email if you wish) and then visit a detail page (http://www.colorfavs.com/palettes/14958/) and click "add collection." Once you've added a collection, go to another detail page for a different palette and add collection again. Now that you've created a collection, you should see the drop down in the modal window for adding that palette to an existing collection. That drop down menu wasn't showing at all until I gave it a min-height. I assumed it was something weird with the code for that modal window or something.

@tjosseau
Copy link
Author

Yeah I see. :) However, my issue occurs when the window content must be restricted with an overflow. For example, just add a "overflow:hidden" to the "#add-collection" element while choosing a collection.
P.S.: Nice web app !

@deronsizemore
Copy link

P.S.: Nice web app !

Thanks!

As for the issue at hand... seems like a tough one. I've been messing around with it because I initially didn't think it would be that difficult to fix but I stand corrected. I've exhausted all of my CSS knowledge on it and I can't seem to get a working solution. Google turns up a few links about giving the dropdown position: absolute but that doesn't seem to do anything with a select or die dropdown. Sorry I wasn't more help.

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

No branches or pull requests

2 participants