-
Notifications
You must be signed in to change notification settings - Fork 26.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[url_launcher] nested Link element not working [web] #147977
Comments
Reproducible using the code sample provided in the repo above. I tested on macOS and it worked as expected there as well, so this appears to be web specific. Labeling for further investigation flutter doctor -v
|
As for today, this is by design. Links are platform views, and platform views are leaf layers. What actually happens is one platform view is stacked on top of another platform view rather than becoming a child of the other. If we want |
Steps to reproduce
(it does work on android but not on web)
Expected results
Both the outer and the inner Link widget should open the Uri they have been assigned.
Actual results
The other Link widget works as expected.
The inner Link widget does not allow clicks at all AND the browser shows the outer's Uri on hover.
Code sample
I created a simple app only to demonstrate this, all the code is in the
main.dart
file: https://github.com/quaaantumdev/urllauncher_nested_link_issueThe App is very simple, it shows a stream of dummy-posts, each made by some user. It should be possible to click the post, leading to the page for the post. It should also be possible to click the part for the user and this should lead you to the user's page.
You can simply run the app and try to click the user-part to see the issue.
Code sample from the example app which creates the two Link widgets
I also tried this with GestureDetector instead of the Inkwell, same result there.
Screenshots or Video
No response
Logs
No response
Flutter Doctor output
Doctor output
The text was updated successfully, but these errors were encountered: