summaryrefslogtreecommitdiffstats
path: root/client/src
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2016-10-15 22:05:51 +0300
committerPekka Hyvönen <pekka@vaadin.com>2016-12-09 09:39:00 +0200
commit7b957a5c378532b11ebfb66156c3a46898f9231b (patch)
tree5afbb3e50174dda1968c652a907b1e454bdf74fc /client/src
parentcc64935345aa767e8cdb1f7b229b89060748e441 (diff)
downloadvaadin-framework-7b957a5c378532b11ebfb66156c3a46898f9231b.tar.gz
vaadin-framework-7b957a5c378532b11ebfb66156c3a46898f9231b.zip
Allow a resize listener to fire a resize listener (#20338)
Change-Id: I6b045c3a693e88b3cba182ae9ea68cfa98c914b0
Diffstat (limited to 'client/src')
-rw-r--r--client/src/main/java/com/vaadin/client/LayoutManager.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/client/src/main/java/com/vaadin/client/LayoutManager.java b/client/src/main/java/com/vaadin/client/LayoutManager.java
index ad0a3f8c38..878ac17901 100644
--- a/client/src/main/java/com/vaadin/client/LayoutManager.java
+++ b/client/src/main/java/com/vaadin/client/LayoutManager.java
@@ -350,9 +350,12 @@ public class LayoutManager {
int firedListeners = 0;
if (!listenersToFire.isEmpty()) {
+ HashSet<Element> listenersCopy = new HashSet<Element>(
+ listenersToFire);
+ listenersToFire.clear();
firedListeners = listenersToFire.size();
Profiler.enter("Layout fire resize events");
- for (Element element : listenersToFire) {
+ for (Element element : listenersCopy) {
Collection<ElementResizeListener> listeners = elementResizeListeners
.get(element);
if (listeners != null) {
@@ -393,8 +396,6 @@ public class LayoutManager {
"Layout fire resize events - listeners not null");
}
}
- listenersToFire.clear();
-
Profiler.leave("Layout fire resize events");
}