-
Notifications
You must be signed in to change notification settings - Fork 309
Tappable links' touch target can extend through whitespace #214
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
Comments
Wacky! Thanks for the report. Copying what I said at #204 (comment) : A variation on that scenario would be when the paragraph wraps over multiple lines, and the last line is short and ends with a link. I'd guess the same bug would reproduce there. It sounds like the last TextSpan's |
Ah indeed; the "short" part of "[i]f you have a short paragraph ending in a link" is not required. 🙂 (I observed the case you described in my testing and meant to include it in the report.) |
It looks like this was the following upstream issue (which appear to be dupes unless I'm missing something):
Those were closed by flutter/flutter#140621 (the same upstream change that induced #475, which is why I came across them). So it's likely this issue no longer reproduces. If not, we can close it. |
By saying `tester.tapAt(find.text('hello'))`, we had been aiming at the center of the Text widgets, and expecting that to hit the recognizer we've put on the span, even though the widget is much wider than the span and the latter doesn't reach the former's center. Effectively we were relying on the presence of issue zulip#214. But with an upstream change yesterday: flutter/flutter#140621 such a tap no longer hits the span. That broke these tests. To fix them, aim the taps near the start of the widget instead. Fixes: zulip#475
And update Flutter's supporting libraries to match. In particular this pulls in the following upstream change: flutter/flutter#140621 which fixes zulip#214. Fixes: zulip#214
By saying `tester.tapAt(find.text('hello'))`, we had been aiming at the center of the Text widgets, and expecting that to hit the recognizer we've put on the span, even though the widget is much wider than the span and the latter doesn't reach the former's center. Effectively we were relying on the presence of issue #214. But with an upstream change yesterday: flutter/flutter#140621 such a tap no longer hits the span. That broke these tests. To fix them, aim the taps near the start of the widget instead. Fixes: #475
And update Flutter's supporting libraries to match. In particular this pulls in the following upstream change: flutter/flutter#140621 which fixes #214. Fixes: #214
If you have a short paragraph ending in a link, the space between the link and the end margin is also tappable. Shown here in the app as built for macOS, so you can see the tappable area when the cursor changes on hover:
The text was updated successfully, but these errors were encountered: