DEV: Check for mobile upload button presence (#24059)
If rendering would break before `_bindMobileUploadButton` - this would fail too, obscuring the original issue.
This commit is contained in:
parent
ebeb07f6c3
commit
b3caa90f6e
|
@ -634,21 +634,23 @@ export default Mixin.create(ExtendableUploader, UppyS3Multipart, {
|
|||
this.mobileUploadButton = document.getElementById(
|
||||
this.mobileFileUploaderId
|
||||
);
|
||||
this.mobileUploadButtonEventListener = () => {
|
||||
document.getElementById(this.fileUploadElementId).click();
|
||||
};
|
||||
this.mobileUploadButton.addEventListener(
|
||||
this.mobileUploadButton?.addEventListener(
|
||||
"click",
|
||||
this.mobileUploadButtonEventListener,
|
||||
this._mobileUploadButtonEventListener,
|
||||
false
|
||||
);
|
||||
}
|
||||
},
|
||||
|
||||
@bind
|
||||
_mobileUploadButtonEventListener() {
|
||||
document.getElementById(this.fileUploadElementId).click();
|
||||
},
|
||||
|
||||
_unbindMobileUploadButton() {
|
||||
this.mobileUploadButton?.removeEventListener(
|
||||
"click",
|
||||
this.mobileUploadButtonEventListener
|
||||
this._mobileUploadButtonEventListener
|
||||
);
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in New Issue