Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

onCreateWindow does not work as advertised #369

Closed
edwin-egalite opened this issue May 29, 2020 · 2 comments
Closed

onCreateWindow does not work as advertised #369

edwin-egalite opened this issue May 29, 2020 · 2 comments

Comments

@edwin-egalite
Copy link

Environment

Flutter version: 1.19.0-2.0.pre.173
Plugin version: 3.2.0
Android version: 9 (Pie)
iOS version: -
Xcode version: -
Device information: Redmi Note 7

Description

Clicked an anchor tag with target="_blank" got called to "shouldOverrideUrlLoading" with "isMainFrame = false" instead of "onCreateWindow"
Expected behavior:

Current behavior:

Steps to reproduce

  1. Opens a static page with an anchor tag with target="_blank" and any link in href.
  2. Click on the anchor tag.
  3. It opens in the current webview
@pichillilorenzo
Copy link
Owner

If you ever read the API docs, it is clearly written that, on Android, you need to set the option supportMultipleWindows: true:

initialOptions: InAppWebViewGroupOptions(
  crossPlatform: InAppWebViewOptions(
    debuggingEnabled: true,
    useShouldOverrideUrlLoading: true
  ),
  android: AndroidInAppWebViewOptions(
    supportMultipleWindows: true
  )
),

This was referenced Jul 6, 2020
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants