fix: cjk input in calendar and row detail (#4726)

This commit is contained in:
Richard Shiue 2024-02-24 22:55:35 +08:00 committed by GitHub
parent f5cc6521fb
commit 4ca3ba8e08
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 2 deletions

View File

@ -268,7 +268,11 @@ class _TitleTextCellSkin extends IEditableTextCellSkin {
textStyle: Theme.of(context).textTheme.bodyMedium?.copyWith(fontSize: 14), textStyle: Theme.of(context).textTheme.bodyMedium?.copyWith(fontSize: 14),
focusNode: focusNode, focusNode: focusNode,
hintText: LocaleKeys.calendar_defaultNewCalendarTitle.tr(), hintText: LocaleKeys.calendar_defaultNewCalendarTitle.tr(),
onChanged: (text) => bloc.add(TextCellEvent.updateText(text)), onChanged: (text) {
if (textEditingController.value.composing.isCollapsed) {
bloc.add(TextCellEvent.updateText(text));
}
},
); );
} }
} }

View File

@ -302,7 +302,11 @@ class _TitleSkin extends IEditableTextCellSkin {
isDense: true, isDense: true,
isCollapsed: true, isCollapsed: true,
), ),
onChanged: (text) => bloc.add(TextCellEvent.updateText(text.trim())), onChanged: (text) {
if (textEditingController.value.composing.isCollapsed) {
bloc.add(TextCellEvent.updateText(text));
}
},
); );
} }
} }