Skip to content

Commit

Permalink
fix(input): remove selection when user input something
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisCindy committed Dec 8, 2024
1 parent 258cbbc commit 0cce192
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions webf/lib/src/html/input.dart
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,10 @@ mixin BaseInputElement on WidgetElement {
FlutterFormElementContext? formContext = context.dependOnInheritedWidgetOfExactType<FlutterFormElementContext>();
onChanged(String newValue) {
setState(() {

_selectionStart = null;
_selectionEnd = null;

InputEvent inputEvent = InputEvent(inputType: '', data: newValue);
dispatchEvent(inputEvent);
});
Expand Down

0 comments on commit 0cce192

Please sign in to comment.