PoupPanel and scrolling with the scroll wheel

837 views
Skip to first unread message

jdw

unread,
Dec 7, 2009, 4:18:30 PM12/7/09
to Google Web Toolkit
I'm extending the PopupPanel class to create my own dialog box.
Everything works great. When I show my dialog box I noticed that the
scroll wheel on the mouse only scrolls the page if the mouse is over
the dialog. If the mouse is outside the dialog, using the scroll
wheel does not scroll the page. On the GWT showcase of features page,
this same behavior can be seen with the DialogBox example. Any ideas?

Thanks,
- Jay

Thomas Broyer

unread,
Dec 8, 2009, 7:17:29 PM12/8/09
to Google Web Toolkit
That's because of the "modal" behavior of the DialogBox/PopupPanel, or
more exactly how it is implemented in GWT. You'd rather use a non-
modal popup/dialog with setGlassEnabled(true) (since GWT 2.0 RC2).

(and not only wheel scroll doesn't work, but you cannot use scrollbars
either)

jdw

unread,
Dec 9, 2009, 11:22:49 AM12/9/09
to Google Web Toolkit
Scroll bars do work when a modal dialog or modal popup is visible. I
verified this with the DialogBox example. I don't believe that
"modal" behavior should mean you can't scroll. Using setGlassEnabled
( true ) is not an option as we are using GWT 1.7

Does anyone know a way to get the scroll wheel to work when you have a
modal dialog visible?

Thanks,
- Jay

Thomas Broyer

unread,
Dec 9, 2009, 12:18:19 PM12/9/09
to Google Web Toolkit


On Dec 9, 5:22 pm, jdw <jwootto...@gmail.com> wrote:
> Scroll bars do work when a modal dialog or modal popup is visible.  I
> verified this with the DialogBox example.  I don't believe that
> "modal" behavior should mean you can't scroll.  Using setGlassEnabled
> ( true ) is not an option as we are using GWT 1.7

Can't you switch to GWT 2.0 now that it's officially released? you
shouldn't even have to modify a single line of code (except the call
to setGlassEnabled and the associated CSS), just recompile and profit.

> Does anyone know a way to get the scroll wheel to work when you have a
> modal dialog visible?

Before we switched to GWT 2.0, we were using the GlassPanel from the
GWT-Incubator, show the glass panel and then show the dialog
(eventually, override the dialog's show() and hide() methods to
automatically show/hide the associated glass panel).

HTH

jdw

unread,
Dec 10, 2009, 3:11:16 PM12/10/09
to Google Web Toolkit
Thanks for the response. We can't move to GWT 2.0 because we are too
close to our ship date and testing would not have time for validation.

I will try the GlassPanel approach.

Thanks,
- Jay
Reply all
Reply to author
Forward
0 new messages