mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
fix(appflowy_flutter): fix double click title issue #1324
double click the title to select all the text on it
This commit is contained in:
parent
0dac41b114
commit
2368f5dc4a
@ -55,18 +55,26 @@ class _ViewLeftBarItemState extends State<ViewLeftBarItem> {
|
||||
|
||||
return IntrinsicWidth(
|
||||
key: ValueKey(_controller.text),
|
||||
child: TextField(
|
||||
controller: _controller,
|
||||
focusNode: _focusNode,
|
||||
scrollPadding: EdgeInsets.zero,
|
||||
decoration: const InputDecoration(
|
||||
contentPadding: EdgeInsets.symmetric(vertical: 4.0),
|
||||
border: InputBorder.none,
|
||||
isDense: true,
|
||||
child: GestureDetector(
|
||||
onDoubleTap: () {
|
||||
_controller.selection = TextSelection(
|
||||
baseOffset: 0,
|
||||
extentOffset: _controller.text.length,
|
||||
);
|
||||
},
|
||||
child: TextField(
|
||||
controller: _controller,
|
||||
focusNode: _focusNode,
|
||||
scrollPadding: EdgeInsets.zero,
|
||||
decoration: const InputDecoration(
|
||||
contentPadding: EdgeInsets.symmetric(vertical: 4.0),
|
||||
border: InputBorder.none,
|
||||
isDense: true,
|
||||
),
|
||||
style: Theme.of(context).textTheme.bodyMedium,
|
||||
// cursorColor: widget.cursorColor,
|
||||
// obscureText: widget.enableObscure,
|
||||
),
|
||||
style: Theme.of(context).textTheme.bodyMedium,
|
||||
// cursorColor: widget.cursorColor,
|
||||
// obscureText: widget.enableObscure,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user