-
-
Notifications
You must be signed in to change notification settings - Fork 148
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
[Bug report] ExtendedTextField 点击段尾巴,光标无法移动到最后,官方的 TextField 可以。 #198
Comments
zjywill
changed the title
[Bug report]
[Bug report] ExtendedTextField 点击段尾巴,光标无法移动到最后,官方的 TextField 可以。
Mar 1, 2023
我也遇到这个问题了,什么原因? |
好吧。。3.7之后。。去掉了 1.。这官方 |
3.7 version void selectWordEdge({ required SelectionChangedCause cause }) {
assert(cause != null);
_computeTextMetricsIfNeeded();
assert(_lastTapDownPosition != null);
final TextPosition position = _textPainter.getPositionForOffset(globalToLocal(_lastTapDownPosition! - _paintOffset));
final TextRange word = _textPainter.getWordBoundary(position);
late TextSelection newSelection;
if (position.offset <= word.start) {
newSelection = TextSelection.collapsed(offset: word.start);
} else {
newSelection = TextSelection.collapsed(offset: word.end, affinity: TextAffinity.upstream);
}
_setSelection(newSelection, cause);
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version
11.0.0
Platforms
iOS
Device Model
Iphone 14 pro max , ios 16.3.2
flutter info
How to reproduce?
ExtendedTextField 点击段尾巴,光标无法移动到最后,官方的 TextField 可以。
The text was updated successfully, but these errors were encountered: