fother
28 Jul 2009, 12:59 PM
how to reproduce..
ie8 and in hosted mode
1 - click in the button "get header height" will return 22
2 - ckick in the button "update header height"
1 - click in the button "get header height" will return 27
ff-3.0.12
1 - click in the button "get header height" will return 22
2 - ckick in the button "update header height"
1 - click in the button "get header height" will return 36
why exist this different in ff and ie?
public void onModuleLoad() {
final Portlet portlet = new Portlet();
portlet.setHeading("test 1");
portlet.setSize(400, 200);
final Button btn = new Button("get header height", new SelectionListener<ButtonEvent>() {
@Override
public void componentSelected(final ButtonEvent ce) {
Window.alert(String.valueOf(portlet.getHeader().getOffsetHeight()));
}
});
final Button btn2 = new Button("update header height", new SelectionListener<ButtonEvent>() {
@Override
public void componentSelected(final ButtonEvent ce) {
portlet.getHeader().el().setHeight(portlet.getHeader().getOffsetHeight() + 5 + "px");
}
});
RootPanel.get().add(portlet);
RootPanel.get().add(btn);
RootPanel.get().add(btn2);
}
ie8 and in hosted mode
1 - click in the button "get header height" will return 22
2 - ckick in the button "update header height"
1 - click in the button "get header height" will return 27
ff-3.0.12
1 - click in the button "get header height" will return 22
2 - ckick in the button "update header height"
1 - click in the button "get header height" will return 36
why exist this different in ff and ie?
public void onModuleLoad() {
final Portlet portlet = new Portlet();
portlet.setHeading("test 1");
portlet.setSize(400, 200);
final Button btn = new Button("get header height", new SelectionListener<ButtonEvent>() {
@Override
public void componentSelected(final ButtonEvent ce) {
Window.alert(String.valueOf(portlet.getHeader().getOffsetHeight()));
}
});
final Button btn2 = new Button("update header height", new SelectionListener<ButtonEvent>() {
@Override
public void componentSelected(final ButtonEvent ce) {
portlet.getHeader().el().setHeight(portlet.getHeader().getOffsetHeight() + 5 + "px");
}
});
RootPanel.get().add(portlet);
RootPanel.get().add(btn);
RootPanel.get().add(btn2);
}