diff options
author | Zhe Sun <31067185+ZheSun88@users.noreply.github.com> | 2019-07-29 14:36:39 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-29 14:36:39 +0300 |
commit | 3a1f595b82dd031fecdf8c43f921f9b0b5c96853 (patch) | |
tree | d0fad563b97682cf2aa9a31b1ed4eb914f913245 /client | |
parent | e53237061362c5be5bc0d623c98b8f775b8ad2d4 (diff) | |
download | vaadin-framework-3a1f595b82dd031fecdf8c43f921f9b0b5c96853.tar.gz vaadin-framework-3a1f595b82dd031fecdf8c43f921f9b0b5c96853.zip |
Ensure the upload button has been disabled when set Enabled calling from succeedL… (#11655)
* Ensure the upload button has been disabled when calling from succeedListener with Push enabled
* Add Tests to verify
Diffstat (limited to 'client')
-rw-r--r-- | client/src/main/java/com/vaadin/client/ui/VUpload.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/client/src/main/java/com/vaadin/client/ui/VUpload.java b/client/src/main/java/com/vaadin/client/ui/VUpload.java index 681eaaf2f2..7ec8fbb71f 100644 --- a/client/src/main/java/com/vaadin/client/ui/VUpload.java +++ b/client/src/main/java/com/vaadin/client/ui/VUpload.java @@ -226,6 +226,17 @@ public class VUpload extends SimplePanel { rebuildPanel(); submitted = false; } + ensureUploadButton(); + + } + + private void ensureUploadButton() { + //when push got enabled, need to ensure the upload is disabled properly + //check ticket #11652 + if (fu.getElement().getParentElement().getParentElement() + .hasClassName("v-disabled")) { + disableUpload(); + } } private void setEnabledForSubmitButton(boolean enabled) { |