From 0f64ae445bae3c6e7a0d7fee1b6db9717e3da59a Mon Sep 17 00:00:00 2001 From: Artur Date: Fri, 11 Aug 2017 16:07:51 +0300 Subject: Do not wait for icons to load before interacting with a combo box (#9717) Icon load detection code does not handle error events so broken images will cause tests to fail forever. In other cases also, it seems very rare to need icons to be loaded before interacting with a combo box. If there really are use cases for this, it would be better to have a method to query if all icons are loaded so that special tests can use this method. Fixes https://github.com/vaadin/testbench/issues/916 --- client/src/main/java/com/vaadin/client/ui/VComboBox.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'client/src') diff --git a/client/src/main/java/com/vaadin/client/ui/VComboBox.java b/client/src/main/java/com/vaadin/client/ui/VComboBox.java index 61e9b46e68..bb75385007 100644 --- a/client/src/main/java/com/vaadin/client/ui/VComboBox.java +++ b/client/src/main/java/com/vaadin/client/ui/VComboBox.java @@ -1989,12 +1989,10 @@ public class VComboBox extends Composite implements Field, KeyDownHandler, ClickEvent.getType()); selectedItemIcon.addDomHandler(VComboBox.this, MouseDownEvent.getType()); - iconUpdating = true; selectedItemIcon.addDomHandler(new LoadHandler() { @Override public void onLoad(LoadEvent event) { afterSelectedItemIconChange(); - iconUpdating = false; } }, LoadEvent.getType()); panel.insert(selectedItemIcon, 0); @@ -2449,7 +2447,6 @@ public class VComboBox extends Composite implements Field, KeyDownHandler, boolean preventNextBlurEventInIE = false; private String explicitSelectedCaption; - private boolean iconUpdating = false; /* * (non-Javadoc) @@ -2709,7 +2706,7 @@ public class VComboBox extends Composite implements Field, KeyDownHandler, @Override public boolean isWorkPending() { return dataReceivedHandler.isWaitingForFilteringResponse() - || suggestionPopup.lazyPageScroller.isRunning() || iconUpdating; + || suggestionPopup.lazyPageScroller.isRunning(); } /** -- cgit v1.2.3