-
Notifications
You must be signed in to change notification settings - Fork 575
Description
The file directory opens correctly on the first attempt, but if the user cancels the file selection, it fails to open on subsequent attempts. However, if the WebView instance is killed and reopened, the file picker works again on the first try. The behavior is normal for successful selections but breaks in the cancellation scenario
The onShowFileChooser callback is not being triggered in your AdvancedWebView from im.delight.android.webview.AdvancedWebView because this library does not fully support file picker functionality through a custom WebChromeClient. This is due to the following reasons:
WebChromeClient Override:
The AdvancedWebView internally manages its own WebChromeClient, which can override the one you are setting in BaseWebviewFragment, preventing your custom file chooser logic from being triggered.
Mismatch in WebView Type:
Your VideoEnabledWebChromeClient is designed for the standard WebView and may not fully integrate with the AdvancedWebView, leading to unhandled file chooser events.
JavaScript and Mixed Content Settings:
If JavaScript triggers the file input, the AdvancedWebView might not handle it correctly due to CSP (Content Security Policy) or mixed content settings.