Skip to content
This repository has been archived by the owner on Oct 20, 2022. It is now read-only.

Turbolinks modal closes when using file upload element #27

Closed
nconroy opened this issue Jul 28, 2018 · 5 comments
Closed

Turbolinks modal closes when using file upload element #27

nconroy opened this issue Jul 28, 2018 · 5 comments

Comments

@nconroy
Copy link

nconroy commented Jul 28, 2018

When launching a component with a visit the modal is dismissed when trying to upload a file using a form file element.

Turbolinks.visit({ component: 'ModuleView', modal: false});
Works well on Android but the component is dismissed when camera or photo gallery is loaded.

@nconroy
Copy link
Author

nconroy commented Jul 28, 2018

@lazaronixon
Copy link
Owner

thank you... I will check it as possible

@nconroy
Copy link
Author

nconroy commented Jul 29, 2018

By the way, the reason it has to be in a component is that for uploads to work on Android we have to use this https://github.com/andreipfeiffer/react-native-webview-android-file-upload

@nconroy
Copy link
Author

nconroy commented Oct 7, 2018

This is not a duplicate as it is an iOS issue

@nconroy
Copy link
Author

nconroy commented Oct 7, 2018

Are you able to add this event overide:
override func dismiss(animated flag: Bool, completion: (() -> Void)? = nil){ if(self.presentedViewController != nil) { super.dismiss(animated: flag, completion: completion) } }
This will fix the issue with file uploads on iOS turbolink modals

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants