summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
Diffstat (limited to 'client')
-rw-r--r--client/src/com/vaadin/client/ui/AbstractComponentConnector.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/client/src/com/vaadin/client/ui/AbstractComponentConnector.java b/client/src/com/vaadin/client/ui/AbstractComponentConnector.java
index f1ed0caf10..9a1c21d556 100644
--- a/client/src/com/vaadin/client/ui/AbstractComponentConnector.java
+++ b/client/src/com/vaadin/client/ui/AbstractComponentConnector.java
@@ -190,6 +190,10 @@ public abstract class AbstractComponentConnector extends AbstractConnector
final MouseEventDetails mouseEventDetails = MouseEventDetailsBuilder.buildMouseEventDetails(
event.getNativeEvent(), getWidget().getElement());
+ // Prevent selection for the element while pending long tap.
+ WidgetUtil.setTextSelectionEnabled(getWidget().getElement(),
+ false);
+
final EventTarget eventTarget = event.getNativeEvent()
.getEventTarget();
@@ -285,6 +289,8 @@ public abstract class AbstractComponentConnector extends AbstractConnector
*/
private void cancelTouchTimer() {
if (longTouchTimer != null) {
+ // Re-enable text selection
+ WidgetUtil.setTextSelectionEnabled(getWidget().getElement(), true);
longTouchTimer.cancel();
}
}