summaryrefslogtreecommitdiffstats
path: root/client/src/com
diff options
context:
space:
mode:
authorDenis Anisimov <denis@vaadin.com>2014-03-16 22:10:43 +0200
committerVaadin Code Review <review@vaadin.com>2014-03-31 16:55:57 +0000
commit99de80ae526d507d1fb0f90a27d1e401f3f76850 (patch)
treef7a3d7b6364d481fd7e6653c1d31babc5b02c22f /client/src/com
parent353a1a1c3073975ddc6d0f25d8d2b21b9df94343 (diff)
downloadvaadin-framework-99de80ae526d507d1fb0f90a27d1e401f3f76850.tar.gz
vaadin-framework-99de80ae526d507d1fb0f90a27d1e401f3f76850.zip
Bring window to front on window header click (#13445).
Change-Id: I3322dcff0199125f49cc48afdc467516b420e845
Diffstat (limited to 'client/src/com')
-rw-r--r--client/src/com/vaadin/client/ui/VWindow.java15
1 files changed, 11 insertions, 4 deletions
diff --git a/client/src/com/vaadin/client/ui/VWindow.java b/client/src/com/vaadin/client/ui/VWindow.java
index 6a908aaa29..396fc76eb0 100644
--- a/client/src/com/vaadin/client/ui/VWindow.java
+++ b/client/src/com/vaadin/client/ui/VWindow.java
@@ -991,14 +991,14 @@ public class VWindow extends VWindowOverlay implements
}
bubble = false;
}
+ if (type == Event.ONCLICK) {
+ activateOnClick();
+ }
} else if (dragging || !contents.isOrHasChild(target)) {
onDragEvent(event);
bubble = false;
} else if (type == Event.ONCLICK) {
- // clicked inside window, ensure to be on top
- if (!isActive()) {
- bringToFront();
- }
+ activateOnClick();
}
/*
@@ -1020,6 +1020,13 @@ public class VWindow extends VWindowOverlay implements
}
}
+ private void activateOnClick() {
+ // clicked inside window or inside header, ensure to be on top
+ if (!isActive()) {
+ bringToFront();
+ }
+ }
+
private void onCloseClick() {
client.updateVariable(id, "close", true, true);
}