victor-valencia / bootstrap-iconpicker

A simple icon picker
https://victor-valencia.github.com/bootstrap-iconpicker/
MIT License
377 stars 140 forks source link

Using js to set the iconpicker to a button hides it behind bootstrap modals. #91

Closed WriterStat closed 3 years ago

WriterStat commented 3 years ago

First off very cool iconpicker software, thx!

When I use jQuery to set the iconpicker to a button it appears to set the iconpicker-popover z-index property displayed to the default bootstrap 1010 z-index.

How do I grab a selector to change the z-index back to 1050.

I tried using straight css, but no joy.

I see the .iconpicker div gets a temporary iconpicker_id when created but didn't know how to get access to the id or get it passed to me dynamically in js code.

One of the things we tried was .iconpicker-popover. But this didn't work.

Probably something easy.

I used:

$('#iconP').iconpicker(); With some of the options specified.

And thought I'd use something like $('.iconpicker-popover').css(); with the right selector. Or set the .iconpicker-popover css locally on the page with the right selector.

To reset the z-index, if I can find the right selector for it. All the ones we tried got ignored.

Any thoughts much appreciated, I'm sure it's just something we missed.

Thx,

WriterStat commented 3 years ago

In case someone else runs across this.

I'm opening the picker from an edit modal, from a bootstrap modal app.

After quite a bit of trying different popover css selector variations, I wasn't able to get a specific css selector for the icon picker that would work in css or jq and I couldn't find a way to get the iconpicker to send me back an object handle to it.

So I ended up just placing the general in the local file:

.popover { z-index:1050; }

As it was just the easiest and we don't use .popovers anywhere else in the app. However this may cause problems to those who do use popovers in different places not sure. So a more specific css selector would probably be better. Or possibly a way to specify the container for the iconpicker popover could fix this as well. Just short on time.

Thanks again, still cool.