lunahq / flutter-crisp

Flutter plugin for Crisp Chat
https://pub.dev/packages/crisp
MIT License
23 stars 42 forks source link

file upload is broken #2

Closed jackdreilly closed 4 years ago

jackdreilly commented 4 years ago

I cannot upload files on android.

If you click "+", it opens the file browser. Then I select a file, and then it restarts the webview

jackdreilly commented 4 years ago

I just tried with the example project, and same, it does not work.

I'm debugging on a android motox4

jackdreilly commented 4 years ago

Note that the regular chat works fine

jackdreilly commented 4 years ago

Wow, that took me way too long to track down, but it's this line: https://github.com/lunahq/flutter-crisp/blob/master/lib/crisp_view.dart#L35

If you comment out that line, file uploading works.

Why was the reload call necessary?

f2acode commented 4 years ago

Hey @jackdreilly it's due to a bug in WebView library, the keyboard stop working when we go to a browser (by opening a link for example), I'm gonna put a flag for that to avoid reload with opening file upload. Thank you for the feedback!