summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelype Santiago Ferreira <felype@vaadin.com>2013-11-11 15:19:48 +0200
committerVaadin Code Review <review@vaadin.com>2013-11-14 09:50:56 +0000
commit07b1a9d75a139e6ee30e35b13bd4f8108c0350b3 (patch)
tree39d3fb57773e4f2b5a8cb9ac343d8ce69f55163e
parentcbc9949b6922d31c848f6288565c9c3de3359780 (diff)
downloadvaadin-framework-07b1a9d75a139e6ee30e35b13bd4f8108c0350b3.tar.gz
vaadin-framework-07b1a9d75a139e6ee30e35b13bd4f8108c0350b3.zip
Prevents accidental selection of window caption or content. (#12726)
Change-Id: Ida479ef0c421cf67b2863cf78c76b495337f30cf
-rw-r--r--client/src/com/vaadin/client/ui/VWindow.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/client/src/com/vaadin/client/ui/VWindow.java b/client/src/com/vaadin/client/ui/VWindow.java
index 03a65e8ece..e27ad383a9 100644
--- a/client/src/com/vaadin/client/ui/VWindow.java
+++ b/client/src/com/vaadin/client/ui/VWindow.java
@@ -708,6 +708,12 @@ public class VWindow extends VOverlay implements ShortcutActionHandlerOwner,
// dblclick handled in connector
if (type != Event.ONDBLCLICK && draggable) {
if (type == Event.ONMOUSEDOWN) {
+ /**
+ * Prevents accidental selection of window caption or
+ * content. (#12726)
+ */
+ event.preventDefault();
+
headerDragPending = event;
} else if (type == Event.ONMOUSEMOVE
&& headerDragPending != null) {