matgessel / gwt-tk

Automatically exported from code.google.com/p/gwt-tk
1 stars 1 forks source link

ModalDialog horizontal centering doesn't work in GWT 1.4_RC1 #15

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
GWT version: 1.4.10
GWT Tk version: 0.2.3
Browsers tested: IE6, FF2
Browsers affected: IE6, FF2

What steps will reproduce the problem?
1. Create ModalDialog instance, 
2. add some widgets, including text boxes
3. show() the dialog

What is the expected result? 

Dialog should appear centered.

What happens instead?

Dialog only centered vertically, x position = 0

Please provide any additional information below.

When no text boxes present, dialog shown not totally on the left but still
more on the left side and not perfectly centered.

I am using a table attached to the dialog to hold text boxes and buttons.

Original issue reported on code.google.com by alexande...@gmail.com on 31 Jul 2007 at 3:08

GoogleCodeExporter commented 9 years ago
This is a side-effect of a (fixed) issue in GWT1.4_RC1: 
http://code.google.com/p/google-web-toolkit/issues/detail?id=1231

To work-around it you can set the ModalDialog's position to absolute before 
showing it: 
ModalDialog dialog = new ModalDialog();
DomUtil.setStyleAttribute(dialog, "position", "absolute");
dialog.show();

This workaround should not be necessary in RC2. 

Original comment by mat.ges...@gmail.com on 2 Aug 2007 at 2:23