Skip to content

Commit 40c23b7

Browse files
authored
Merge pull request #1951 from hyj1204/fix/double_click_title_issue_1324
fix(appflowy_flutter): fix double click title issue #1324
2 parents 5b4043b + 2368f5d commit 40c23b7

File tree

1 file changed

+19
-11
lines changed

1 file changed

+19
-11
lines changed

frontend/appflowy_flutter/lib/workspace/presentation/widgets/left_bar_item.dart

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -55,18 +55,26 @@ class _ViewLeftBarItemState extends State<ViewLeftBarItem> {
5555

5656
return IntrinsicWidth(
5757
key: ValueKey(_controller.text),
58-
child: TextField(
59-
controller: _controller,
60-
focusNode: _focusNode,
61-
scrollPadding: EdgeInsets.zero,
62-
decoration: const InputDecoration(
63-
contentPadding: EdgeInsets.symmetric(vertical: 4.0),
64-
border: InputBorder.none,
65-
isDense: true,
58+
child: GestureDetector(
59+
onDoubleTap: () {
60+
_controller.selection = TextSelection(
61+
baseOffset: 0,
62+
extentOffset: _controller.text.length,
63+
);
64+
},
65+
child: TextField(
66+
controller: _controller,
67+
focusNode: _focusNode,
68+
scrollPadding: EdgeInsets.zero,
69+
decoration: const InputDecoration(
70+
contentPadding: EdgeInsets.symmetric(vertical: 4.0),
71+
border: InputBorder.none,
72+
isDense: true,
73+
),
74+
style: Theme.of(context).textTheme.bodyMedium,
75+
// cursorColor: widget.cursorColor,
76+
// obscureText: widget.enableObscure,
6677
),
67-
style: Theme.of(context).textTheme.bodyMedium,
68-
// cursorColor: widget.cursorColor,
69-
// obscureText: widget.enableObscure,
7078
),
7179
);
7280
}

0 commit comments

Comments
 (0)