-
Notifications
You must be signed in to change notification settings - Fork 25
Fix forwarded messages double click (#1271) #1304
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
base: main
Are you sure you want to change the base?
Conversation
FCM
|
// https://github.com/flutter/flutter/issues/124787 | ||
const WidgetSpan(child: SizedBox(width: 95)), | ||
], | ||
child: DoubleTapTextSelector( |
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.
While this indeed fixes the issue with double tapping the text, it still doesn't feel as easy and as native as in ChatItemWidget
:
Screen.Recording.2025-06-27.at.16.02.13.mp4
-
Double tap + tap outside.
InChatItemWidget
: selection disappears.
InChatForwardWidget
: selection stays and forwarded message is redirected. -
Triple tap.
InChatItemWidget
: the whole text becomes selected.
InChatForwardWidget
: selection stays on a single word and forwarded message is redirected.
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.
To fix all of this, we need to copy a lot of SelectableRegion
code to this "FixWidget"
.
Pros:
- It fixes the problem without adding
SelectionArea
s to every forwarded message.
Cons:
- Code would be outdated and could break after Flutter update.
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.
Should I do it?
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.
@ekrem-qb, are you really sure this is the only solution to the problem?
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.
@ekrem-qb, are you really sure this is the only solution to the problem? I don't find such a solution appropriate. Copying Flutter code is bad due to the reasons you stated.
@ekrem-qb, and about labels: ~"bug" label cannot be applied to PR, because PR is not a bug. PR fixes a bug. |
3332013
to
9e67a6b
Compare
@ekrem-qb, I see you're using force pushing all the time by default. While force push itself is a useful feature, it shouldn't be used in a team practice, as it breaks the history completely and makes the previous code reviews messy - the comments left won't lead to the appropriate commits and team won't be able to even see what was there before you force pushed. https://www.reddit.com/r/git/comments/1db7n1w/comment/l7pnp8r/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button |
@SleepySquash I am not using force push all the time by default, I did rebase, that's why I used force push. Rebase or Merge is a controversial topic but if force pushing is forbidden, I won't do it anymore, I am sorry. |
@ekrem-qb, it's not forbidden and may be used in certain situations that require it. It's your development branch after all, not the mainline branch. The downsides are stated in the previous comment. Fast forward merge commit won't have those downsides, I suppose. |
- fix `Copy text` menu option visibility for forwarded messages with empty note - add ability to copy all quotes from forwarded messages without text selection - add ability to copy certain quote from forwarded messages without text selection
Resolves #1271
Synopsis
Text inside forwarded messages can be selected, but only manually by dragging the cursor. Double clicking on forwarded messages can't select the text.
Flutter chooses deepest child
GestureRecognizer
forPointerEvent
s, soWidgetButton
blocksSelectionArea
ofChatView
.We could add
SelectionArea
s for every forwarded message but it would make them heavy to render on Web.Solution
This PR fixes the problem without adding additional
SelectionArea
s. It does that by manually processing double taps and applying selection changes in parentSelectionArea
.Checklist
k::
labels applied