Fix detach assertion error caused by loading messing being removed

Apparently when we delete a RootPanel's DOM element from the host
page we also must call detachNow() to remove it from the cleanup
list within GWT, otherwise the onUnload handler for the page has
an assertion error in hosted mode.

Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
Shawn O. Pearce
2009-02-16 09:52:28 -08:00
parent 24d344a10c
commit fef096c00d

View File

@@ -280,6 +280,7 @@ public class Gerrit implements EntryPoint {
private void showInitialScreen() {
final RootPanel sg = RootPanel.get("gerrit_startinggerrit");
sg.getElement().getParentElement().removeChild(sg.getElement());
RootPanel.detachNow(sg);
History.addHistoryListener(new Link());
if ("".equals(History.getToken())) {