marc76
22 Nov 2010, 5:43 AM
Hi,
there is a bug with tooltip positions when there are scrollbars, they are not included in the calculation of the position.
GXT 2.2.1
Firefox 3.6.12
The method com.extjs.gxt.ui.client.widget.tips.Tip.showAt() uses finally com.extjs.gxt.ui.client.core.XDOM.getViewportWidth()/Height(), which uses native $wnd.self.innerWidth/innerHeight, which is not aware of scrollbars, so the tooltip is not moved far enough to the left/top.
Screenshot for wrong horizontal position (the horizontal scrollbar only appears because of the wrong position of the tooltip):
23450
Code of screenshot (adjust browser size so that vertical scrollbar appears, and tooltip has to be moved to the left):
public class Test implements EntryPoint {
public void onModuleLoad() {
RootPanel rootPanel = RootPanel.get();
HorizontalPanel hp1 = new HorizontalPanel();
TextField<String> tf1 = new TextField<String>();
tf1.setWidth(500);
Label l2 = new Label("label");
l2.setWidth(50);
l2.setToolTip("you should see the complete tooltip");
hp1.add(tf1);
hp1.add(l2);
hp1.setBorders(true);
hp1.setHeight(800);
rootPanel.add(hp1);
}
}
Would be nice if this can be fixed.
Thanks and greetings, Marc
there is a bug with tooltip positions when there are scrollbars, they are not included in the calculation of the position.
GXT 2.2.1
Firefox 3.6.12
The method com.extjs.gxt.ui.client.widget.tips.Tip.showAt() uses finally com.extjs.gxt.ui.client.core.XDOM.getViewportWidth()/Height(), which uses native $wnd.self.innerWidth/innerHeight, which is not aware of scrollbars, so the tooltip is not moved far enough to the left/top.
Screenshot for wrong horizontal position (the horizontal scrollbar only appears because of the wrong position of the tooltip):
23450
Code of screenshot (adjust browser size so that vertical scrollbar appears, and tooltip has to be moved to the left):
public class Test implements EntryPoint {
public void onModuleLoad() {
RootPanel rootPanel = RootPanel.get();
HorizontalPanel hp1 = new HorizontalPanel();
TextField<String> tf1 = new TextField<String>();
tf1.setWidth(500);
Label l2 = new Label("label");
l2.setWidth(50);
l2.setToolTip("you should see the complete tooltip");
hp1.add(tf1);
hp1.add(l2);
hp1.setBorders(true);
hp1.setHeight(800);
rootPanel.add(hp1);
}
}
Would be nice if this can be fixed.
Thanks and greetings, Marc