diff options
author | Zhe Sun <31067185+ZheSun88@users.noreply.github.com> | 2019-07-29 14:36:39 +0300 |
---|---|---|
committer | Zhe Sun <31067185+ZheSun88@users.noreply.github.com> | 2019-07-30 16:12:37 +0300 |
commit | 1b5d3c06690a17f60fcbe4488ce53e8b922c90df (patch) | |
tree | fc05218c6a83e8fa5380da2afbb19d9282b85482 /client | |
parent | ea9107525457eb142d91ec3e27257772979ba059 (diff) | |
download | vaadin-framework-1b5d3c06690a17f60fcbe4488ce53e8b922c90df.tar.gz vaadin-framework-1b5d3c06690a17f60fcbe4488ce53e8b922c90df.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) { |