From 0cce192cfb1854fc4cea27a7da010c4c00162ff4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=80=86=E8=91=B5?= Date: Sun, 8 Dec 2024 20:37:28 +0800 Subject: [PATCH] fix(input): remove selection when user input something --- webf/lib/src/html/input.dart | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/webf/lib/src/html/input.dart b/webf/lib/src/html/input.dart index e4e50b4e4d..8af0fca6b2 100644 --- a/webf/lib/src/html/input.dart +++ b/webf/lib/src/html/input.dart @@ -445,6 +445,10 @@ mixin BaseInputElement on WidgetElement { FlutterFormElementContext? formContext = context.dependOnInheritedWidgetOfExactType(); onChanged(String newValue) { setState(() { + + _selectionStart = null; + _selectionEnd = null; + InputEvent inputEvent = InputEvent(inputType: '', data: newValue); dispatchEvent(inputEvent); });