Cannot opening file dialog programmatically on Ipad, Iphone (ios 9, 8.3) with fastclick
See original GitHub issueHello. I have this code in my button:
<button className="btn btn-attach" title="Прикрепить изображение" onClick={e => this.openDropzone(e)}>
<em className="icon material-icons">wallpaper</em>
</button>
and method:
openDropzone(e) {
e.preventDefault();
console.log('openDropzone');
this.dropzone.open();
}
Dropzone ref is ref={(node) => { this.dropzone = node; }}
My button place inside Dropzone.
<Dropzone ref={(node) => { this.dropzone = node; }}
accept={this.state.dropzone.accept}
maxSize={this.state.dropzone.maxSize}
multiple={this.state.dropzone.multiple}
disableClick={this.state.dropzone.disableClick}
name="files"
className={dropZoneClasses}
onDrop={e => this.onDrop(e)}
onDropRejected={e => this.onDropRejected(e)}
onDragEnter={e => this.onDragEnter(e)}
onDragLeave={e => this.onDragLeave(e)}>
<div className="content-control__textarea">
...
<div className="content-control__panel">
<button type="submit" className={submitClasses} disabled={!this.state.valid}>Отправить</button>
<button className="btn btn-attach" type="button" title="Прикрепить изображение" onClick={e => this.dropzone.open()}>
<em className="icon material-icons">wallpaper</em>
</button>
<button className="btn btn-attach" type="button" title="Прикрепить файлы" onClick={e => this.dropzone.open()}>
<em className="icon icon-paper-clip"/>
</button>
</div>
</div>
</Dropzone>
But dialog not opening on mobile devices. How I can fix it?
"react": "^15.3.2",
"react-dropzone": "^3.13.0",
"react-fastclick": "^3.0.2-alpha.1",
update: If I disable react-fastclick - all work properly
Issue Analytics
- State:
- Created 6 years ago
- Comments:16
Top Results From Across the Web
Input click can't be triggered programanticly on iOS <12
I'm having an issue with triggering the opening of a file dialogue on older iOS devices, specifically, the issue seems to be on...
Read more >View and modify files and folders in Files on iPad
In the Files app , view and modify your documents, images, and other files. Browse and open files and folders. Tap Browse at...
Read more >About the 'Trust This Computer' alert on your iPhone, iPad, or ...
When you connect your iPhone, iPad, or iPod touch to a computer or other device for the first time, an alert asks whether...
Read more >iOS update and restore errors - Apple Support
Learn how to solve iOS update and restore errors.
Read more >If an app on your iPhone or iPad stops responding, closes ...
Close and reopen the app. Force the app to close. Then open the app to see if it's working as expected. Restart your ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@rkmarks It corresponds to the code in the example. The issue is that it does not work in my webview android application. It seems that the refDropzone.open does not work.
This issue has been automatically marked as stale because it has not had recent activity in the past 60 days. It will be closed if no further activity occurs. If the problem persists please comment here to bump your issue. Thank You - React Dropzone Maintaners