首页 > 解决方案 > webview_flutter target _blank is not working

问题描述

I am using webview_flutter 0.3.3+1, my initialUrl loads fine, It contains various links, when clicking on a link it navigates properly but if a link has target set to _BLANK, it doesn't do anything.

WebView(
      initialUrl: 'https://SOME_URL',
      javascriptMode: JavascriptMode.unrestricted,
)

This Works

<a href="http://example.com">Link A</a>

below doesn't work, it should open external browser but click doesn't take anywhere

<a href="http://example.com" target="_BLANK">Link B</a>

标签: flutter

解决方案


此问题已在webview_flutter v0.3.19+6

https://github.com/flutter/plugins/pull/2500


推荐阅读