How do I close the current browser tab? The following aren't working.
JavaScript.getCurrent().execute("window.close();");
or
UI.getCurrent().removeWindow(window);
or
window.close();
How do I close the current browser tab? The following aren't working.
JavaScript.getCurrent().execute("window.close();");
or
UI.getCurrent().removeWindow(window);
or
window.close();
Try this:
Window appointmentWindow = getApplication().getWindow(NATIVE_WINDOW_NAME);
if (appointmentWindow != null) {
getApplication().removeWindow(appointmentWindow);
}
Source: https://vaadin.com/forum/#!/thread/235330
Try this.
gBrowser.removeCurrentTab();