Skip to content

Commit

Permalink
Disallow canceling dialog in onJsConfirm
Browse files Browse the repository at this point in the history
  • Loading branch information
quanquan1 committed Mar 13, 2024
1 parent 09714fb commit 79d71f5
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ public boolean onConsoleMessage(ConsoleMessage cm) {
public boolean onJsConfirm(WebView view, String url, String message, final JsResult result) {
new AlertDialog.Builder(view.getContext()).setTitle(R.string.affirm)
.setMessage(message)
.setCancelable(false)
.setPositiveButton(android.R.string.ok, (dialog, which) -> result.confirm())
.setNegativeButton(android.R.string.cancel, (dialog, which) -> result.cancel())
.create()
Expand Down

0 comments on commit 79d71f5

Please sign in to comment.