File tree Expand file tree Collapse file tree 1 file changed +9
-11
lines changed
frontend/app_flowy/lib/workspace/presentation/plugins/grid/src/widgets/cell/url_cell Expand file tree Collapse file tree 1 file changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -71,11 +71,18 @@ class _GridURLCellState extends State<GridURLCell> {
7171 fontSize: 14 ,
7272 decoration: TextDecoration .underline,
7373 ),
74- recognizer: _tapGesture (context),
7574 ),
7675 );
7776
78- return Align (alignment: Alignment .centerLeft, child: richText);
77+ return SizedBox .expand (
78+ child: GestureDetector (
79+ child: Align (alignment: Alignment .centerLeft, child: richText),
80+ onTap: () async {
81+ widget.onFocus.value = true ;
82+ final url = context.read <URLCellBloc >().state.url;
83+ await _openUrlOrEdit (url);
84+ },
85+ ));
7986 },
8087 ),
8188 );
@@ -94,15 +101,6 @@ class _GridURLCellState extends State<GridURLCell> {
94101 super .didUpdateWidget (oldWidget);
95102 }
96103
97- TapGestureRecognizer _tapGesture (BuildContext context) {
98- final gesture = TapGestureRecognizer ();
99- gesture.onTap = () async {
100- final url = context.read <URLCellBloc >().state.url;
101- await _openUrlOrEdit (url);
102- };
103- return gesture;
104- }
105-
106104 Future <void > _openUrlOrEdit (String url) async {
107105 final uri = Uri .parse (url);
108106 if (url.isNotEmpty && await canLaunchUrl (uri)) {
You can’t perform that action at this time.
0 commit comments