The problem turned out to be a couple of z-index css properties associated
with the select2 component not being big enough to work with the Wicket
ModalWindow.
Here are the changes I made to made to the select2 css to make it work with
the Wicket ModalWindow.
.select2-drop {
z-index: 30001;
}
.select2-drop-mask {
z-index: 30000;
}
The first one is obvious -- if you don't have it the drop-downs open behind
the ModalWindow. The second one fixes the problem of the drop-down not
closing correctly (e.g., when you click outside of them) in a ModalWindow.
Thanks
Andrew
On Tue, Aug 27, 2013 at 9:20 AM, Andrew Geery <[email protected]>wrote:
> I'm using the fantastic select2 component in my Wicket 6.7 application via
> the Wicket-select2 integration package [
> https://github.com/ivaynberg/wicket-select2/], version 2.2.2.
>
> It works great on a regular page. On a page, clicking outside of the
> select2 component causes the component to close.
>
> However, when used in a Wicket ModalWindow, clicking outside of the
> select2 component (i.e., clicking somewhere else in the ModalWindow) does
> not cause the component to close. Some issues have been reported around
> this (https://github.com/ivaynberg/wicket-select2/issues/13,
> https://github.com/ivaynberg/wicket-select2/issues/35) and the tickets
> say the issue should be fixed in select 3.3.0. Version 2.2.2 of the
> wicket-select2 package includes version 3.3.2 of select2. However, I'm
> still seeing the problem.
>
> Is anyone else seeing this behavior? Should the issue be fixed?
>
> Thanks
> Andrew
>