Skip to content

Double cursor using iOS floating cursor (keyboard cursor move with spacebar) #89228

Closed

Description

@Curvel

I created this Issue for the last bug described in #17030, which we also just encountered, because the #17030 got closed.

Steps to Reproduce

OS: iOs and iPadOS

import 'package:flutter/material.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: Center(
          child: TextField(),
        ),
      ),
    );
  }
}

Enter so much text into the TextField, that the TextField starts scrolling. Then try to scroll with two fingers, on the spacebar, horizontally through the text.

Expected results: The curser moves with the fingers and scrolls horizontal through the TextField.

Actual results: A second curser appears, which moves separately to the original curser, and the TextField doesn't scroll horizontally.

Logs

[+18718 ms] [LayoutConstraints] Unable to simultaneously satisfy constraints.
[        ] 	Probably at least one of the constraints in the following list is one you don't want. 
[        ] 	Try this: 
[        ] 		(1) look at each constraint and try to figure out which you don't expect; 
[        ] 		(2) find the code that added the unwanted constraint or constraints and fix it. 
[        ] 	(Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints) 
[        ] (
[        ]     "<NSAutoresizingMaskLayoutConstraint:0x2820c7700 h=--& v=--& _UIButtonBarButton:0x10888cf40.height == 0   (active)>",
[        ]     "<NSLayoutConstraint:0x2820f8aa0 _UIUCBKBSelectionBackground:0x10888d860.bottom == _UIButtonBarButton:0x10888cf40.bottom - 6   (active)>",
[        ]     "<NSLayoutConstraint:0x2820f88c0 V:|-(6)-[_UIUCBKBSelectionBackground:0x10888d860]   (active, names: '|':_UIButtonBarButton:0x10888cf40 )>"
[        ] )
[        ] Will attempt to recover by breaking constraint 
[        ] <NSLayoutConstraint:0x2820f8aa0 _UIUCBKBSelectionBackground:0x10888d860.bottom == _UIButtonBarButton:0x10888cf40.bottom - 6   (active)>
[        ] Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
[        ] The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKitCore/UIView.h> may also be helpful.
[        ] [LayoutConstraints] Unable to simultaneously satisfy constraints.
[        ] 	Probably at least one of the constraints in the following list is one you don't want. 
[        ] 	Try this: 
[        ] 		(1) look at each constraint and try to figure out which you don't expect; 
[        ] 		(2) find the code that added the unwanted constraint or constraints and fix it. 
[        ] 	(Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints) 
[        ] (
[        ]     "<NSAutoresizingMaskLayoutConstraint:0x2820fb610 h=--& v=--& _UIButtonBarButton:0x10888b3c0.height == 0   (active)>",
[        ]     "<NSLayoutConstraint:0x2820f82d0 V:|-(6)-[_UIUCBKBSelectionBackground:0x10888bc60]   (active, names: '|':_UIButtonBarButton:0x10888b3c0 )>",
[        ]     "<NSLayoutConstraint:0x2820fbe30 _UIUCBKBSelectionBackground:0x10888bc60.bottom == _UIButtonBarButton:0x10888b3c0.bottom - 6   (active)>"
[        ] )
[        ] Will attempt to recover by breaking constraint 
[        ] <NSLayoutConstraint:0x2820fbe30 _UIUCBKBSelectionBackground:0x10888bc60.bottom == _UIButtonBarButton:0x10888b3c0.bottom - 6   (active)>
[        ] Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
[        ] The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKitCore/UIView.h> may also be helpful.
[        ] [LayoutConstraints] Unable to simultaneously satisfy constraints.
[        ] 	Probably at least one of the constraints in the following list is one you don't want. 
[        ] 	Try this: 
[        ] 		(1) look at each constraint and try to figure out which you don't expect; 
[        ] 		(2) find the code that added the unwanted constraint or constraints and fix it. 
[        ] 	(Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints) 
[        ] (
[        ]     "<NSAutoresizingMaskLayoutConstraint:0x2820f8a50 h=--& v=--& _UIButtonBarButton:0x10888bde0.height == 0   (active)>",
[        ]     "<NSLayoutConstraint:0x2820f8dc0 V:|-(6)-[_UIUCBKBSelectionBackground:0x10888c5e0]   (active, names: '|':_UIButtonBarButton:0x10888bde0 )>",
[        ]     "<NSLayoutConstraint:0x2820f8d70 _UIUCBKBSelectionBackground:0x10888c5e0.bottom == _UIButtonBarButton:0x10888bde0.bottom - 6   (active)>"
[        ] )
[        ] Will attempt to recover by breaking constraint 
[        ] <NSLayoutConstraint:0x2820f8d70 _UIUCBKBSelectionBackground:0x10888c5e0.bottom == _UIButtonBarButton:0x10888bde0.bottom - 6   (active)>
[        ] Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
[        ] The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKitCore/UIView.h> may also be helpful.



Analyzing bug...                                                        
No issues found! (ran in 3.5s)


[✓] Flutter (Channel stable, 2.2.3, on macOS 11.4 20F71 darwin-x64, locale en-DE)
    • Flutter version 2.2.3 at /Users/curvel/dev/flutter
    • Framework revision f4abaa0735 (9 weeks ago), 2021-07-01 12:46:11 -0700
    • Engine revision 241c87ad80
    • Dart version 2.13.4

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /Users/curvel/Library/Android/sdk
    • Platform android-30, build-tools 30.0.3
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.5.1, Build version 12E507
    • CocoaPods version 1.10.1

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2020.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)

[✓] IntelliJ IDEA Community Edition (version 2021.1)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart

[✓] VS Code (version 1.59.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension can be installed from:
      🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[✓] Connected device (4 available)
    • Curvel’s iPad (mobile) • 00008027-001E08420C22002E            • ios            • iOS 14.6
    • iPhone 12 (mobile)     • AB9878B8-38E4-4250-B538-BAA98837CFA5 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-14-5 (simulator)
    • macOS (desktop)        • macos                                • darwin-x64     • macOS 11.4 20F71 darwin-x64
    • Chrome (web)           • chrome                               • web-javascript • Google Chrome 92.0.4515.159

• No issues found!

Activity

  1. danagbemava-nc commented on Sep 1, 2021

    @danagbemava-nc
    Member

    Hi @Curvel, thanks for filing the issue.
    I can reproduce it on master 2.6.0-1.0.pre.152 and stable 2.2.3.

    The issue can be seen with both CupertinoTextField and TextField widgets.

    See attached images below:

    CupertinoTextField TextField
    IMG_2884 IMG_2885
    IMG_2883 IMG_2882
    flutter doctor -v
    [✓] Flutter (Channel master, 2.6.0-1.0.pre.152, on macOS 11.5.1 20G80
        darwin-arm, locale en-GB)
        • Flutter version 2.6.0-1.0.pre.152 at /Users/nexus/dev/sdks/flutters
        • Upstream repository https://github.com/flutter/flutter.git
        • Framework revision 56c5f13035 (4 hours ago), 2021-08-31 23:26:02 -0400
        • Engine revision aab40c8d5d
        • Dart version 2.15.0 (build 2.15.0-66.0.dev)
    
    [✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
        • Android SDK at /Users/nexus/Library/Android/sdk
        • Platform android-31, build-tools 31.0.0
        • Java binary at: /Applications/Android
          Studio.app/Contents/jre/Contents/Home/bin/java
        • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
        • All Android licenses accepted.
    
    [✓] Xcode - develop for iOS and macOS (Xcode 12.5.1)
        • Xcode at /Applications/Xcode.app/Contents/Developer
        • CocoaPods version 1.10.2
    
    [✓] Chrome - develop for the web
        • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
    
    [✓] Android Studio (version 2020.3)
        • Android Studio at /Applications/Android Studio.app/Contents
        • Flutter plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/9212-flutter
        • Dart plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/6351-dart
        • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
    
    [✓] VS Code (version 1.59.1)
        • VS Code at /Applications/Visual Studio Code.app/Contents
        • Flutter extension version 3.25.0
    
    [✓] Connected device (3 available)
        • Nexus’ IPhone (mobile) • 00008020-001875E83A38002E • ios            • iOS
          14.6 18F72
        • macOS (desktop)        • macos                     • darwin-arm64   •
          macOS 11.5.1 20G80 darwin-arm
        • Chrome (web)           • chrome                    • web-javascript •
          Google Chrome 92.0.4515.159
    
    • No issues found!
    [✓] Flutter (Channel stable, 2.2.3, on macOS 11.5.1 20G80 darwin-arm, locale
        en-GB)
        • Flutter version 2.2.3 at /Users/nexus/dev/sdks/flutter
        • Framework revision f4abaa0735 (9 weeks ago), 2021-07-01 12:46:11 -0700
        • Engine revision 241c87ad80
        • Dart version 2.13.4
    
    [✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
        • Android SDK at /Users/nexus/Library/Android/sdk
        • Platform android-31, build-tools 31.0.0
        • Java binary at: /Applications/Android
          Studio.app/Contents/jre/jdk/Contents/Home/bin/java
        • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
        • All Android licenses accepted.
    
    [✓] Xcode - develop for iOS and macOS
        • Xcode at /Applications/Xcode.app/Contents/Developer
        • Xcode 12.5.1, Build version 12E507
        • CocoaPods version 1.10.2
    
    [✓] Chrome - develop for the web
        • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
    
    [✓] Android Studio (version 2020.3)
        • Android Studio at /Applications/Android Studio.app/Contents
        • Flutter plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/9212-flutter
        • Dart plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/6351-dart
        • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
    
    [✓] VS Code (version 1.59.1)
        • VS Code at /Applications/Visual Studio Code.app/Contents
        • Flutter extension version 3.25.0
    
    [✓] Connected device (3 available)
        • Nexus’ IPhone (mobile) • 00008020-001875E83A38002E • ios            • iOS
          14.6
        • macOS (desktop)        • macos                     • darwin-arm64   •
          macOS 11.5.1 20G80 darwin-arm
        • Chrome (web)           • chrome                    • web-javascript •
          Google Chrome 92.0.4515.159
    
    • No issues found!
  2. added
    a: text inputEntering text in a text field or keyboard related problems
    p: cupertino_uicupertino_ui package in flutter/packages
    p: material_uimaterial_ui package in flutter/packages
    frameworkflutter/packages/flutter repository. See also f: labels.
    has reproducible stepsThe issue has been confirmed reproducible and is ready to work on
    platform-iosiOS applications specifically
    and removed
    in triagePresently being triaged by the triage team
    on Sep 1, 2021
  3. Curvel commented on Sep 1, 2021

    @Curvel
    Author

    @danagbemava-nc thanks for classifying the issue. Could you tell me which priority an issue like this one has for your team?

  4. danagbemava-nc commented on Sep 1, 2021

    @danagbemava-nc
    Member

    Hi @Curvel, unfortunately that isn't information I can provide at this moment. The issue needs to go through secondary triage before the appropriate priority label can be applied.

  5. Curvel commented on Sep 1, 2021

    @Curvel
    Author

    Okay. @danagbemava-nc thanks for your response :)

  6. changed the title [-]Keyboard curser move/scroll with the spacebar on iOS doesn't work[/-] [+]Keyboard cursor move/scroll with the spacebar on iOS doesn't work[/+] on Nov 8, 2021
  7. 9 remaining items

  8. added
    team-designOwned by Design Languages team
    triaged-designTriaged by Design Languages team
    and removed
    team-iosOwned by iOS platform team
    triaged-iosTriaged by iOS platform team
    on Jul 17, 2023
  9. added a commit that references this issue on Jan 3, 2024
    0d4eb5e
  10. added
    r: fixedIssue is closed as already fixed in a newer version
    on Jan 4, 2024
  11. github-actions commented on Jan 18, 2024

    @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 Jan 18, 2024
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 problemsfound in release: 2.2Found to occur in 2.2found in release: 2.6Found to occur in 2.6frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onp: cupertino_uicupertino_ui package in flutter/packagesp: material_uimaterial_ui package in flutter/packagesplatform-iosiOS applications specificallyr: fixedIssue is closed as already fixed in a newer versionteam-designOwned by Design Languages teamtriaged-designTriaged by Design Languages team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions