Exempt some elements from Modalness
My application has modal dialogs in it, and also a feedback widget that sticks off the side of the page at all times. I'd like users to be able to click the feedback widget without canceling the modal dialog. In effect, I'd like to exempt the feedback widget from the modal rules of the app.
What's the best way to achieve this? I'm using GWT 2.3, and I'm happy to drill down into whatever layer of 开发者_JAVA技巧abstraction I need to.
"Modal" popups actually don't behave well in GWT; that's why setGlassEnabled
has been added. If you use setGlassEnabled
, you can then simply set a higher z-index
to any element that you want to appear on top of the glass pane, it's just CSS.
Looking at the PopupPanel
source it appears that adding your feedback widget as an auto-hide partner will do what you want:
Widget feedback;
DialogBox modal = new DialogBox(false, true);
modal.addAutoHidePartner(feedback.getElement());
modal.show();
精彩评论