GWT 1.5 DialogBox vs GWT 1.4

10 views
Skip to first unread message

Mike Viens

unread,
May 22, 2008, 12:53:39 PM5/22/08
to Google Web Toolkit
The outer element of the DialogBox in GWT 1.4 is a DIV, while in GWT
1.5 it is a table. This presents a (negative) change in behavior when
moving the dialog to the right edge of the screen.

In 1.4, when the dialog approaches the right-most portion of the
screen, the DIV automatically shrinks horizontally while also growing
vertically (essentially word-wrapping). It behaves by not scrolling
the dialog box off screen, thereby producing a horizontal scroll bar.
This behavior is the same for both IE7 and Firefox.

In 1.5, when the dialogs approaches the right-most portion of the
screen, the TABLE is automatically pushed off screen and does not word-
wrap. This applies to both IE7 and Firefox. In Firefox, continuing
to move the dialog almost entirely off-screen finally causes it to
word-wrap into a very narrow and very tall box on-screen. In IE7, the
dialog never wraps, just moves entirely off screen.

Also, the 1.5 DialogBox is created with the attribute of
"overflow:hidden". This causes the left side of the dialog's border
to not be displayed in Firefox. In addition, when the dialog is moved
to the right, the missing border is displayed in a trailing fashion,
resulting in "screen garbage". Once the dialog reaches the right-most
edge and creates the horizontal scroll bar, the "screen garbage" is
immediately cleared. With IE7, the border is correctly displayed and
there is no "screen garbage".

Using Firebug, if I edit the style on the dialog box to remove
"overflow-y:hidden", the issue with the missing border and "screen
garbage" is resolved.

A few questions:

1. Why was DialogBox changed so radically from GWT 1.4 to 1.5?

2. Why is the DialogBox in 1.5 now a TABLE rather than a DIV?

3. Is there any way to get back the DialogBox from 1.4?

4. Is there any chance of these bugs getting resolved in SOON, which
would make them available via SVN?

Mike V.

Mike Viens

unread,
May 22, 2008, 5:42:41 PM5/22/08
to Google Web Toolkit
I would like to also point out that the PopupPanel class is now wrong,
too. In GWT 1.4, when it was rendered as a DIV, it worked. Now that
it is rendered as a TABLE in GWT 1.5, the following is no longer true:

public void setVisible(boolean visible) {
// We use visibility here instead of UIObject's default of display
// Because the panel is absolutely positioned, this will not
create
// "holes" in displayed contents and it allows normal layout
passes
// to occur so the size of the PopupPanel can be reliably
determined.
DOM.setStyleAttribute(getElement(), "visibility", visible ?
"visible"
: "hidden");

// If the PopupImpl creates an iframe shim, it's also necessary to
hide it
// as well.
impl.setVisible(getElement(), visible);
}

It DOES leave holes, so it needs to be changed back to
UIObject.setVisible() which correctly handles it as the "display:none"
rather than "visibility"hidden".

Mike V.

John LaBanca

unread,
May 23, 2008, 10:49:14 AM5/23/08
to Google Web Toolkit
Mike -

You might be using an older version of the trunk. As of r2645, the
PopupPanel has been reverted back to the old PopupPanel, and a new
DecoratedPopupPanel has been created which wraps its content in a 3x3
grid so users can add rounded corners. The DialogBox is a subclass of
the DecoratedPopupPanel, which means it wraps its content in a 3x3
grid so the corners can be rounded. However, the 3x3 grid is now
wrapped in a div just as it was before the changes. I verified that
the content of a DialogBox wraps when it is dragged to the right edge
of the screen in any browser.

I did find one issue in IE where the iframe behind the DialogBox is a
couple pixels too large, so even though the content wraps, you see a
horizontal scroll bar that can be shifted only 2-3 pixels. I created
the following issue to track it:
http://code.google.com/p/google-web-toolkit/issues/detail?id=2443

Mike Viens

unread,
May 23, 2008, 2:39:40 PM5/23/08
to Google Web Toolkit
Thanks John!

I did update to yesterday's trunk (05/22/2008) and saw that it was
reverted back to a DIV. This clears up all of the issues identified
above, but introduced a couple of new issues. I have not been able to
verify if these are new issues, or my issues.

1. The "modal" property does not seem to be working. I can access
any fields "below" the popup. And when the cursor is in a field
covered by the popup, the cursor shows through.

2. I am using the code example for the JavaDocs for PopupPanel.
[ popup.setPopupPositionAndShow(new PopupPanel.PositionCallback() ]
The issue I am seeing is that when the setPosition() method is called,
the values for offsetWidth and offsetHeight are always 0.

Any thoughts?

Rudy Krol

unread,
May 29, 2008, 12:24:10 PM5/29/08
to Google Web Toolkit
Hi community (first post here)

I've build a GWT 1.4 application with a DialogBox and I tried to
upgrade to GWT 1.5.
Everything seems to be OK, exepted when showing the DialogBox.

In fact, it works well on Firefox 2, but not on IE6 (I didn't try
other browser or version).

My IE window simply disappears when showing this DialogBox, so I see
the window which was behind the IE window.
IE is not crashed or killed, but I have to click on it in the Windows
taskbar to see it again.

Any idea ?

Rudy

Srini Marreddy

unread,
May 29, 2008, 1:57:08 PM5/29/08
to Google Web Toolkit
Hi Rudy,
I am also facing exactly same problem!!. Any help to resolve
this is highly Appreciated.When i display the dialogbox IE window
moves backwards and the window behind IE moved to front. The same code
works fine with GWT 1.4

-Srini

pasqual

unread,
Jun 11, 2008, 1:39:23 PM6/11/08
to Google Web Toolkit
Hi Rudy and Srini,

Same thing here. This happens for me, not when calling dialog.open(),
but rather when the dialog is open and I click outside of its bounds,
the ie window jumps to the back of all open windows (happens in hosted
mode too of course). Firefox works fine, it's only broken in ie.
Have you found any solution or should we start a new thread?

Thanks,
Pasqual

On May 29, 12:57 pm, Srini Marreddy <srmarre...@gmail.com> wrote:
> Hi Rudy,
> I am also facing exactly same problem!!. Any help to resolve
> this is highly Appreciated.When i display thedialogboxIE window
> moves backwards and the window behind IE moved to front. The same code
> works fine with GWT 1.4
>
> -Srini
>
> On May 29, 11:24 am, Rudy Krol <rudy.k...@gmail.com> wrote:
>
> > Hi community (first post here)
>
> > I've build a GWT 1.4 application with aDialogBoxand I tried to
> > upgrade to GWT 1.5.
> > Everything seems to be OK, exepted when showing theDialogBox.
>
> > In fact, it works well on Firefox 2, but not on IE6 (I didn't try
> > other browser or version).
>
> > My IE window simply disappears when showing thisDialogBox, so I see
Reply all
Reply to author
Forward
0 new messages