GWT TabLayoutPanel not allow text selection on tabs

146 Views Asked by At

Hi is there a way to not allow text selection on tabs for GWT TabLayoutPanel (and other gwt widgets)?

I tried to use css like:

.gwt-TabLayoutPanel {
    user-select: none;
}

.gwt-TabLayoutPanel .gwt-TabLayoutPanelTabs {
    user-select: none;
}
.gwt-TabLayoutPanel .gwt-TabLayoutPanelContent {
    user-select: none;
} 

.gwt-TabLayoutPanel .gwt-TabLayoutPanelTab {
    user-select: none;
} 

.gwt-TabLayoutPanel .gwt-TabLayoutPanelTab-selected {
    user-select: none;
}

Thanks!

1

There are 1 best solutions below

2
Tobika On BEST ANSWER

This has already been answered: look here

-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;

for IE < 10 and opera:

<div id="foo" unselectable="on">...</div>