-
-
Notifications
You must be signed in to change notification settings - Fork 36
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
Fix wrong bounding box for text line in block #144
Conversation
Codecov Report
@@ Coverage Diff @@
## master #144 +/- ##
=======================================
Coverage 84.01% 84.02%
=======================================
Files 60 60
Lines 9348 9351 +3
=======================================
+ Hits 7854 7857 +3
Misses 1494 1494
|
There is definitely a problem with hit testing but the fix at #77 is only solving problem for blocks and causes another issue (#143). We need to merge this and then find a way for fixing underlying problem. WDYT? @amantoux A normal text line with link on master branch showing the hit test problem: Update:After testing RichText(
text: TextSpan(children: [
TextSpan(text: 'Test'),
TextSpan(text: 'with'),
TextSpan(
text: 'Link',
mouseCursor: SystemMouseCursors.click,
recognizer: TapGestureRecognizer()
..onTap = () {
print('Tap');
}),
]),
); RichText(
text: TextSpan(children: [
TextSpan(text: 'Test'),
TextSpan(text: 'with'),
TextSpan(
text: 'Link',
mouseCursor: SystemMouseCursors.click,
recognizer: TapGestureRecognizer()
..onTap = () {
print('Tap');
}),
]),
); This is a weird behavior to me. I think we have two options now:
|
@Amir-P Either solution works but if 2. is easily acheivable, I think we should go for this one |
Yeah, after experimenting with |
8cfe749
to
5d21ad4
Compare
Finally, I've decided to keep text lines constraints unchanged and instead check if hit test position is in text boxes. I think it's ready for review. @amantoux |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks @Amir-P
Fixes #143 and changes hit test in text line to prevent trailing empty space from triggering rich text hit test.
Before:
After: