Skip to content

Flutter does not support iOS 3d touch keyboard trackpad #5445

Closed

Description

@eseidelGoogle

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.

May be the same root cause as #5328 and #4818.

Activity

  1. modified the milestone: on Sep 12, 2016
  2. added
    a: text inputEntering text in a text field or keyboard related problems
    on Jan 10, 2018
  3. modified the milestones: , on Jan 10, 2018
  4. rodydavis commented on Jul 9, 2018

    @rodydavis
    Contributor

    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.

  5. eseidelGoogle commented on Jul 16, 2018

    @eseidelGoogle
    ContributorAuthor

    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.

  6. cbracken commented on Jul 16, 2018

    @cbracken
    Member

    I believe (but have not confirmed) that this is the case. Methods in question.

  7. richgoldmd commented on Aug 25, 2018

    @richgoldmd

    I agree with @AppleEducate - a bit of a show stopper on iOS.

  8. rodydavis commented on Aug 25, 2018

    @rodydavis
    Contributor

    @richgoldmd it really makes the app look bad when they can’t move the cursor.

  9. teaualune commented on Oct 5, 2018

    @teaualune

    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!

  10. xster commented on Oct 23, 2018

    @xster
    Member

    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.

  11. github-actions commented on Aug 17, 2021

    @github-actions

    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.

  12. locked as resolved and limited conversation to collaborators on Aug 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    a: fidelityMatching the OEM platforms bettera: text inputEntering text in a text field or keyboard related problemsplatform-iosiOS applications specifically

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions