Skip to content

Commit af32689

Browse files
Revert "[url_launcher] fix: Link widget Tab traversal" (#9980)
Reverts #9815 The tree is now broken in exactly the way the presubmits for that PR were broken; it should not have landed.
1 parent 2d651b2 commit af32689

File tree

4 files changed

+9
-49
lines changed

4 files changed

+9
-49
lines changed

packages/url_launcher/url_launcher_web/CHANGELOG.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
## 2.4.2
1+
## NEXT
22

3-
* Ensure link widget merge its semantic node with its children to avoid duplicate nodes.
43
* Updates minimum supported SDK version to Flutter 3.29/Dart 3.7.
54

65
## 2.4.1

packages/url_launcher/url_launcher_web/example/integration_test/link_widget_test.dart

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -208,43 +208,6 @@ void main() {
208208
maxScrolls: 1000,
209209
);
210210
});
211-
212-
testWidgets('MergeSemantics is always present to avoid duplicate nodes', (
213-
WidgetTester tester,
214-
) async {
215-
await tester.pumpWidget(
216-
MaterialApp(
217-
home: Scaffold(
218-
body: Column(
219-
children: <Widget>[
220-
WebLinkDelegate(
221-
TestLinkInfo(
222-
uri: Uri.parse('https://dart.dev/xyz'),
223-
target: LinkTarget.blank,
224-
builder: (BuildContext context, FollowLink? followLink) {
225-
return ElevatedButton(
226-
onPressed: followLink,
227-
child: const Text('First Button'),
228-
);
229-
},
230-
),
231-
),
232-
],
233-
),
234-
),
235-
),
236-
);
237-
238-
await tester.pumpAndSettle();
239-
240-
final Finder buttonFinder = find.byType(ElevatedButton);
241-
expect(buttonFinder, findsOneWidget);
242-
243-
final Element buttonElement = tester.element(buttonFinder);
244-
final MergeSemantics? parentWidget =
245-
buttonElement.findAncestorWidgetOfExactType<MergeSemantics>();
246-
expect(parentWidget, isNotNull);
247-
});
248211
});
249212

250213
group('Follows links', () {

packages/url_launcher/url_launcher_web/lib/src/link.dart

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -117,15 +117,13 @@ class WebLinkDelegateState extends State<WebLinkDelegate> {
117117
}
118118

119119
Widget _buildChild(BuildContext context) {
120-
return MergeSemantics(
121-
child: Semantics(
122-
link: true,
123-
identifier: _semanticsIdentifier,
124-
linkUrl: widget.link.uri,
125-
child: widget.link.builder(
126-
context,
127-
widget.link.isDisabled ? null : _followLink,
128-
),
120+
return Semantics(
121+
link: true,
122+
identifier: _semanticsIdentifier,
123+
linkUrl: widget.link.uri,
124+
child: widget.link.builder(
125+
context,
126+
widget.link.isDisabled ? null : _followLink,
129127
),
130128
);
131129
}

packages/url_launcher/url_launcher_web/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: url_launcher_web
22
description: Web platform implementation of url_launcher
33
repository: https://github.com/flutter/packages/tree/main/packages/url_launcher/url_launcher_web
44
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+url_launcher%22
5-
version: 2.4.2
5+
version: 2.4.1
66

77
environment:
88
sdk: ^3.7.0

0 commit comments

Comments
 (0)