You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Flutter does not support iOS 3d touch keyboard trackpad #5445
When you hard-press on the alphanumeric keyboard on iOS it turns into a trackpad which allows you to move the cursor around the text field. This doesn't work inside a Flutter app. Presumably due to us using the wrong keyboard integration apis.
I can confirm that on the iPad, and iPhone X using the latest Flutter and iOS 11.4 you cannot 3D touch to move the cursor or use the 2 finger gesture on the iPad to move the cursor.
It can be quite jarring for an iOS user to not be able to move the cursor with 3D touch.
I recently bumped into this issue and tried to implement the missing methods mentioned by @cbracken , but it's more complicated than it looks.
In order to convert between text positions and on-screen coordinates (e.g. in caretRectForPosition or closestPositionToPoint), we need the width/height properties from the Flutter EditableText widget so they can be applied to Core Text methods for measurement; that means a FlutterTextInputView needs to retrieve those information from Flutter side.
The problem is, I'm not sure how to do this via text input channels without adding another bridge methods - it looks like a bad idea to add something like (CGRect)getClientRect:(int)client in FlutterTextInputDelegate.
Is there any elegant ways to do this or another better approach for measurement without Core Text? Thanks!
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
rodydavis commentedon Jul 9, 2018
I can confirm that on the iPad, and iPhone X using the latest Flutter and iOS 11.4 you cannot 3D touch to move the cursor or use the 2 finger gesture on the iPad to move the cursor.
It can be quite jarring for an iOS user to not be able to move the cursor with 3D touch.
eseidelGoogle commentedon Jul 16, 2018
My understanding from @cbracken is this is just us missing a few methods implemented in:
https://github.com/flutter/engine/blob/e632fb8160989888456948ce6f412d83b525810b/shell/platform/darwin/ios/framework/Source/FlutterTextInputPlugin.mm
Probably not hard to do. I agree this is unfortunate to have missing.
cbracken commentedon Jul 16, 2018
I believe (but have not confirmed) that this is the case. Methods in question.
richgoldmd commentedon Aug 25, 2018
I agree with @AppleEducate - a bit of a show stopper on iOS.
rodydavis commentedon Aug 25, 2018
@richgoldmd it really makes the app look bad when they can’t move the cursor.
teaualune commentedon Oct 5, 2018
I recently bumped into this issue and tried to implement the missing methods mentioned by @cbracken , but it's more complicated than it looks.
In order to convert between text positions and on-screen coordinates (e.g. in
caretRectForPositionorclosestPositionToPoint), we need the width/height properties from the FlutterEditableTextwidget so they can be applied to Core Text methods for measurement; that means aFlutterTextInputViewneeds to retrieve those information from Flutter side.The problem is, I'm not sure how to do this via text input channels without adding another bridge methods - it looks like a bad idea to add something like
(CGRect)getClientRect:(int)clientinFlutterTextInputDelegate.Is there any elegant ways to do this or another better approach for measurement without Core Text? Thanks!
xster commentedon Oct 23, 2018
Oops, this issue is older but since #17030 has more thumbs up reactions, I'm assuming there's some keywords in there that's more searcheable. Merging.
github-actions commentedon Aug 17, 2021
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.