Skip to content

Android: web alert(), confirm(), and prompt() silently do nothing #80

Description

@joemasilotti

On iOS, JS alert(), confirm(), and prompt() render as a native UIAlertController in both Normal and Advanced mode (WebViewController, WebViewUIDelegate). On Android they do nothing at all: LoggingWebChromeClient overrides only onConsoleMessage, onShowFileChooser, and onPermissionRequest, and the WebView default is to suppress these dialogs.

The failure is silent and easy to miss. A confirmation flow like "remove this item?" looks correct on iOS and no-ops on Android, and confirm() returns false so the action never runs. Anything relying on prompt() is worse, since it returns null with no indication why.

Fix: implement onJsAlert, onJsConfirm, and onJsPrompt on the Chrome client with AlertDialog, honoring the JsResult / JsPromptResult callbacks so confirm() and prompt() return real values.

Small, but it is a correctness gap in the Android/iOS parity story (#63).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions