Skip to content

Commit

Permalink
公式输入弹出窗口聚焦bug
Browse files Browse the repository at this point in the history
  • Loading branch information
lyming99 committed Feb 6, 2024
1 parent d0d4b1c commit 855c4e9
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@ class MobileCardSettingsPage extends MvcView<MobileCardSettingsController> {
return fluent.Padding(
padding: MediaQuery.of(context).viewInsets,
child: fluent.ContentDialog(
constraints: BoxConstraints(maxHeight: 200,maxWidth: 300),
title: Text("${title}"),
content: fluent.TextBox(
placeholder: "请输入${title}",
Expand Down
3 changes: 0 additions & 3 deletions lib/editor/edit_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1447,9 +1447,6 @@ class EditController with ChangeNotifier {
position.blockVisionTop = block.top - scrollOffset;
}
cursorRecord.updateCursorPosition(position);
if (!focusNode.hasFocus && editable && viewContext.mounted) {
FocusScope.of(viewContext).requestFocus(focusNode);
}
var old = cursorState.cursorPosition;
if (old != null) {
var oldBlock = old.block;
Expand Down
2 changes: 1 addition & 1 deletion lib/editor/widget/formula_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class _FormulaState extends State<FormulaWidget> {
placeholder: "请输入公式",
controller: controller,
maxLines: null,
autofocus: false,
autofocus: true,
onSubmitted: (s) {},
onChanged: (text) {
setState(() {
Expand Down

0 comments on commit 855c4e9

Please sign in to comment.