flutter_browser_app icon indicating copy to clipboard operation
flutter_browser_app copied to clipboard

Tap on web elements that open link in new tab not working

Open khanhtd36 opened this issue 3 years ago • 5 comments

Environment

Technology Version
Flutter version 2.0.0
App version Git revision 1904602
Android version 10
iOS version -
Xcode version -

Device information: Nokia 6.1 QKQ1.190828.002

Description

Expected behavior: When I tap on web elements that open link in new tab, a new tab opens and go to that url.

Current behavior: When I tap on web elements that open link in new tab, a new tab opens with url about:blank

Steps to reproduce

  1. Open a website that contains an element that opens link in new tab (www.fujinet.net)
  2. Tap on element that opens link in new tab (youtube icon at bottom of the page)
  3. See the target url in new tab (it should be youtube.com but it is about:blank instead)

khanhtd36 avatar Apr 16 '21 10:04 khanhtd36

can You add screenshot from my side its working Well

saliya1000 avatar May 07 '21 08:05 saliya1000

try this

  onCreateWindow: (controller, createWindowRequest) async {
    var webViewTab = WebViewTab(
      key: GlobalKey(),
      webViewModel: WebViewModel(
          url: createWindowRequest.request.url,
          windowId: createWindowRequest.windowId),
    );

    browserModel.addTab(webViewTab);

    return;
  }

jergsss99 avatar Jun 09 '21 03:06 jergsss99

can You add screenshot from my side its working Well

try this

onCreateWindow: (controller, createWindowRequest) async { var webViewTab = WebViewTab( key: GlobalKey(), webViewModel: WebViewModel( url: createWindowRequest.request.url, windowId: createWindowRequest.windowId), );

browserModel.addTab(webViewTab);

return;

}

jergsss99 avatar Jun 15 '21 17:06 jergsss99

I can confirm this issue. Maybe related to this: https://github.com/pichillilorenzo/flutter_inappwebview/issues/877?

emvaized avatar Jun 22 '21 06:06 emvaized

is there any solution to this ?

pranav-js avatar May 05 '22 11:05 pranav-js