Skip to content

[Web] Textfield selection doesn't work correctly in Safari #136006

@zambetpentru

Description

@zambetpentru

Is there an existing issue for this?

Steps to reproduce

In Safari Try to select text in the first Textfield here: https://api.flutter.dev/flutter/material/TextField-class.html

Expected results

Be able to select parts of the textfield in Safari like I can in Chrome.

Actual results

It selects always from the end of the text field

Code sample

Code sample
import 'package:flutter/material.dart';

class TextFieldExampleApp extends StatelessWidget {
  const TextFieldExampleApp({super.key});
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(title: const Text('Obscured Textfield')),
        body: const Center(
          child: const SizedBox(
      width: 250,
      child: TextField(
      ), ),
            ),
          ),
    );
  }
}

void main() => runApp(const TextFieldExampleApp());

Screenshots or Video

Screenshots / Video demonstration

image

Logs

Logs
[Paste your logs here]

Flutter Doctor output

Doctor output
Doctor summary (to see all details, run flutter doctor -v):
[!] Flutter (Channel stable, 3.13.6, on macOS 13.3.1 22E261 darwin-arm64, locale en-GB)
    ! Warning: `flutter` on your path resolves to /Users/omega/flutter/bin/flutter, which is not inside your current Flutter SDK checkout at /users/omega/flutter. Consider adding
      /users/omega/flutter/bin to the front of your path.
    ! Warning: `dart` on your path resolves to /Users/omega/flutter/bin/dart, which is not inside your current Flutter SDK checkout at /users/omega/flutter. Consider adding
      /users/omega/flutter/bin to the front of your path.
[✓] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
[✓] Xcode - develop for iOS and macOS (Xcode 14.3)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.2)
[✓] VS Code (version 1.82.3)
[✓] Connected device (3 available)
[✓] Network resources

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work lista: text inputEntering text in a text field or keyboard related problemsbrowser: safari-macosonly manifests in Safari on macOSc: regressionIt was better in the past than it is nowengineflutter/engine related. See also e: labels.found in release: 3.13Found to occur in 3.13found in release: 3.16Found to occur in 3.16has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-webWeb applications specificallyr: fixedIssue is closed as already fixed in a newer versionteam-webOwned by Web platform team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions