当前位置: 首页 > news >正文

flutter使用html_editor_enhanced: ^2.6.0后,编辑框无法获取焦点,无法操作

flutter使用html_editor_enhanced: ^2.6.0后,编辑框无法获取焦点,无法操作,报如下错误:

PlatformException(error, Unknown feature SUPPRESS_ERROR_PAGE, null, java.lang.RuntimeException: Unknown feature SUPPRESS_ERROR_PAGE
I/flutter (26600): 	at androidx.webkit.internal.WebViewFeatureInternal.isSupported(WebViewFeatureInternal.java:649)
I/flutter (26600): 	at androidx.webkit.internal.WebViewFeatureInternal.isSupported(WebViewFeatureInternal.java:618)
I/flutter (26600): 	at androidx.webkit.WebViewFeature.isFeatureSupported(WebViewFeature.java:611)
I/flutter (26600): 	at com.pichillilorenzo.flutter_inappwebview_android.webview.in_app_webview.InAppWebView.prepare(InAppWebView.java:436)
I/flutter (26600): 	at com.pichillilorenzo.flutter_inappwebview_android.webview.in_app_webview.FlutterWebView.<init>(FlutterWebView.java:82)
I/flutter (26600): 	at com.pichillilorenzo.flutter_inappwebview_android.webview.FlutterWebViewFactory.create(FlutterWebViewFactory.java:67)
I/flutter (26600): 	at io.flutter.plugin.platform.PlatformViewsController.createPlatformView(PlatformViewsController.java:527)
I/flutter (26600): 	at io.flutter.plugin.platform.PlatformViewsController$1.createForPlatformViewLayer(PlatformViewsCo
Exception: HTML editor is still loading, please wait before evaluating this JS: $('#summernote-2').summernote('code', '');!
I/flutter (31854): [2025-05-27 17:54:49.996853 | Catcher 2 | INFO] 
I/flutter (31854): [2025-05-27 17:54:49.997095 | Catcher 2 | INFO] ------- STACK TRACE -------
I/flutter (31854): [2025-05-27 17:54:49.997442 | Catcher 2 | INFO] #0      HtmlEditorController._evaluateJavascript (package:html_editor_enhanced/src/html_editor_controller_mobile.dart:261:9)
I/flutter (31854): [2025-05-27 17:54:49.997599 | Catcher 2 | INFO] #1      HtmlEditorController.setText (package:html_editor_enhanced/src/html_editor_controller_mobile.dart:85:5)

错误原因:
html_editor_enhanced中使用的flutter_inappwebview 插件内部调用了 AndroidX WebView 的 SUPPRESS_ERROR_PAGE 特性检测,但你的设备/系统版本的 WebView 不支持这个新特性,导致异常抛出

解决办法:
降低webview_flutter插件的版本
使用如下版本:

webview_flutter: ^3.0.0

相关文章:

  • 4.8.4 利用Spark SQL实现分组排行榜
  • 2021年认证杯SPSSPRO杯数学建模D题(第二阶段)停车的策略全过程文档及程序
  • 手机如何压缩文件为 RAR 格式:详细教程与工具推荐
  • python:selenium爬取网站信息
  • 华为手机用的时间长了,提示手机电池性能下降,需要去换电池吗?平时要怎么用能让电池寿命长久一些?
  • 8卡910B4-32G测试Qwen2.5-VL-72B-instruct模型兼容性
  • 什么是数字化转型,如何系统性重构业务逻辑
  • SD-WAN 与传统网络方案组合应用:降本增效的政务网建设新策略
  • mac 下安装Rust Toolchain(Nightly)
  • CORS跨域资源共享解析
  • EFcore8和Sql Server 2014冲突
  • WebAssembly 及 HTML Streaming:重塑前端性能与用户体验
  • 【Doris基础】Apache Doris 基本架构深度解析:从存储到查询的完整技术演进
  • 无人机分布式协同算法解析!
  • 考研系列-操作系统:第二章、进程与线程
  • Screen 连接远程服务器(Ubuntu)
  • 视觉中国:镜头下的中国发展图景
  • BGP实验报告
  • 深入理解JavaScript设计模式之call,apply,this
  • go实现定时任务
  • diy建站系统/深圳seo优化外包公司
  • 电商网站怎么做推广/dw网站制作
  • 英国零售电商网站开发/接广告赚钱的平台
  • 公司商城网站建设方案/图片外链工具
  • 改变网站字体/seo推广需要多少钱
  • 铜陵app网站做招聘/网页设计参考网站