Remove hideHandler from CopyableLabel
Clippy seems to be painted below dialogs on my Linux laptop on both Chrome and Firefox. Remove the code to hide the plugin. Change-Id: I609d023bf6a10a7974d5842f2eb50aaa8b3376be
This commit is contained in:
parent
9d1dd581ee
commit
84275b24d6
@ -14,9 +14,6 @@
|
||||
|
||||
package com.google.gwtexpui.clippy.client;
|
||||
|
||||
import static com.google.gwt.dom.client.Style.Visibility.HIDDEN;
|
||||
import static com.google.gwt.dom.client.Style.Visibility.VISIBLE;
|
||||
|
||||
import com.google.gwt.core.client.Scheduler;
|
||||
import com.google.gwt.event.dom.client.BlurEvent;
|
||||
import com.google.gwt.event.dom.client.BlurHandler;
|
||||
@ -24,7 +21,6 @@ import com.google.gwt.event.dom.client.ClickEvent;
|
||||
import com.google.gwt.event.dom.client.ClickHandler;
|
||||
import com.google.gwt.event.dom.client.KeyPressEvent;
|
||||
import com.google.gwt.event.dom.client.KeyPressHandler;
|
||||
import com.google.gwt.event.shared.HandlerRegistration;
|
||||
import com.google.gwt.http.client.URL;
|
||||
import com.google.gwt.user.client.Command;
|
||||
import com.google.gwt.user.client.DOM;
|
||||
@ -37,8 +33,6 @@ import com.google.gwt.user.client.ui.Label;
|
||||
import com.google.gwt.user.client.ui.TextBox;
|
||||
import com.google.gwtexpui.safehtml.client.SafeHtml;
|
||||
import com.google.gwtexpui.safehtml.client.SafeHtmlBuilder;
|
||||
import com.google.gwtexpui.user.client.DialogVisibleEvent;
|
||||
import com.google.gwtexpui.user.client.DialogVisibleHandler;
|
||||
import com.google.gwtexpui.user.client.UserAgent;
|
||||
|
||||
/**
|
||||
@ -76,7 +70,6 @@ public class CopyableLabel extends Composite implements HasText {
|
||||
private Label textLabel;
|
||||
private TextBox textBox;
|
||||
private Element swf;
|
||||
private HandlerRegistration hideHandler;
|
||||
|
||||
public CopyableLabel() {
|
||||
this("");
|
||||
@ -162,27 +155,6 @@ public class CopyableLabel extends Composite implements HasText {
|
||||
getElement().removeChild(swf);
|
||||
}
|
||||
DOM.appendChild(getElement(), swf = SafeHtml.parse(h));
|
||||
initHideHandler();
|
||||
}
|
||||
}
|
||||
|
||||
private void initHideHandler() {
|
||||
if (hideHandler == null && swf != null && isAttached()) {
|
||||
hideHandler =
|
||||
UserAgent.addDialogVisibleHandler(new DialogVisibleHandler() {
|
||||
@Override
|
||||
public void onDialogVisible(DialogVisibleEvent event) {
|
||||
if (event.contains(CopyableLabel.this)) {
|
||||
if (event.isVisible()) {
|
||||
swf.getStyle().setVisibility(VISIBLE);
|
||||
}
|
||||
} else {
|
||||
swf.getStyle().setVisibility(event.isVisible()
|
||||
? HIDDEN
|
||||
: VISIBLE);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -204,19 +176,6 @@ public class CopyableLabel extends Composite implements HasText {
|
||||
embedMovie();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onLoad() {
|
||||
initHideHandler();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onUnload() {
|
||||
if (hideHandler != null) {
|
||||
hideHandler.removeHandler();
|
||||
hideHandler = null;
|
||||
}
|
||||
}
|
||||
|
||||
private void showTextBox() {
|
||||
if (textBox == null) {
|
||||
textBox = new TextBox();
|
||||
|
Loading…
x
Reference in New Issue
Block a user