PDA

View Full Version : [CLOSED] [1.2.3] Tooltips appear after component is removed/hidden



jonjanisch
2 Apr 2009, 7:30 AM
Throughout our application we have scenarios where upon clicking a button:

1) The panel that contains the button is removed
2) A popup that contains the button is "hidden" - popup.hide()

The problem is that the tooltips remain visible for several seconds after the button disappears. In our app, we may have 10 rows of data with "Delete" buttons next to them.

10PM, Eat at Joes, DELETE
11PM, Dinner with Jose, DELETE
12PM, Annoy C# developers, DELETE
etc.

If the user is quick with the mouse, he may delete ~6 rows and have 4 or so tooltips still visible on the screen after the rows have been deleted.

Here's a very simple example to demonstrate it:



public class ExtTestApp implements EntryPoint
{

public void onModuleLoad()
{
final Popup p = new Popup();
p.setStyleAttribute("backgroundColor", "#ddddff");
p.setSize(400, 300);

Button b = new Button("Click me before tooltip appears");
b.setToolTip("I am an annoying tooltip that likes to stick around for a while!");
b.addSelectionListener(new SelectionListener<ComponentEvent>() {
public void componentSelected(ComponentEvent ce)
{
p.hide();
//p.removeAll();
}
});

p.add(b);
p.show();
}
}


Simply click the button before the tooltip appears. After the popup is hidden the tooltip will appear. You can comment out p.hide() and uncomment p.removeAll() to see the same exact behavior in the other scenario. The problem exists in any component that has a tooltip. In our app, we have custom buttons that do not extend GXT button. Ideally, the solution would be fixed at the Component level.

Thanks!

sven
2 Apr 2009, 7:37 AM
This was already reported and is fixed in SVN. Please try again with the latest checkout of the 1.2 branche.