diff options
author | Juho Nurminen <juho@vaadin.com> | 2014-03-20 16:16:41 +0200 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2014-03-28 12:23:14 +0000 |
commit | 5b3ae6d62e5ff49ef0b204ed27b1004399a19aac (patch) | |
tree | 69743208c91bc56be312d33d79cf407147eb647f /client | |
parent | c9eb8566b6671abe8d87f09a7541e7ddeb656c44 (diff) | |
download | vaadin-framework-5b3ae6d62e5ff49ef0b204ed27b1004399a19aac.tar.gz vaadin-framework-5b3ae6d62e5ff49ef0b204ed27b1004399a19aac.zip |
Made Window z-indices update when windows are closed (#13174)
Change-Id: I2fa7566ec4788893d1d99440a7ca2d014c9a8f13
Diffstat (limited to 'client')
-rw-r--r-- | client/src/com/vaadin/client/ui/VWindow.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/client/src/com/vaadin/client/ui/VWindow.java b/client/src/com/vaadin/client/ui/VWindow.java index f83bc83c8d..6afb6c2d8a 100644 --- a/client/src/com/vaadin/client/ui/VWindow.java +++ b/client/src/com/vaadin/client/ui/VWindow.java @@ -487,9 +487,14 @@ public class VWindow extends VOverlay implements ShortcutActionHandlerOwner, } super.hide(); + int curIndex = windowOrder.indexOf(this); // Remove window from windowOrder to avoid references being left // hanging. - windowOrder.remove(this); + windowOrder.remove(curIndex); + // Update the z-indices of any remaining windows + while (curIndex < windowOrder.size()) { + windowOrder.get(curIndex).setWindowOrder(curIndex++); + } } private void fixIE8FocusCaptureIssue() { |