Skip to content

The onShowFileChooser callback is not being triggered in your AdvancedWebView #315

@Akhiay54

Description

@Akhiay54

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions