@Override
public void run() {
- updateCursorPosition();
- boolean textChanged = communicateTextValueToServer();
- if (textChanged) {
- client.sendPendingVariableChanges();
+ if (isAttached()) {
+ updateCursorPosition();
+ boolean textChanged = communicateTextValueToServer();
+ if (textChanged) {
+ client.sendPendingVariableChanges();
+ }
+ scheduled = false;
}
- scheduled = false;
}
};
private boolean scheduled = false;
@Override
protected void onDetach() {
super.onDetach();
- textChangeEventTrigger.cancel();
detachCutEventListener(getElement());
if (focusedTextField == this) {
focusedTextField = null;