mirror of
https://gitee.com/jmix/cuba.git
synced 2024-12-03 03:38:33 +08:00
Tabs should be closed by click on the cross in IE #PL-4992
This commit is contained in:
parent
42f90da1b1
commit
c5cc9204c5
@ -6,6 +6,7 @@
|
||||
package com.haulmont.cuba.web.toolkit.ui.client.tabsheet;
|
||||
|
||||
import com.google.gwt.event.dom.client.*;
|
||||
import com.vaadin.client.VConsole;
|
||||
import com.vaadin.client.ui.VTabsheet;
|
||||
|
||||
/**
|
||||
@ -37,38 +38,5 @@ public class CubaTabSheetWidget extends VTabsheet {
|
||||
public CubaTabBar(VTabsheet tabsheet) {
|
||||
super(tabsheet);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Tab createTab() {
|
||||
return new CubaTab(this);
|
||||
}
|
||||
}
|
||||
|
||||
public static class CubaTab extends Tab {
|
||||
protected boolean focused = false;
|
||||
|
||||
public CubaTab(TabBar tabBar) {
|
||||
super(tabBar);
|
||||
|
||||
addFocusHandler(new FocusHandler() {
|
||||
@Override
|
||||
public void onFocus(FocusEvent event) {
|
||||
focused = true;
|
||||
}
|
||||
});
|
||||
addBlurHandler(new BlurHandler() {
|
||||
@Override
|
||||
public void onBlur(BlurEvent event) {
|
||||
focused = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClose() {
|
||||
if (focused) {
|
||||
super.onClose();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user