Skip to content

Border color is wrong for a focused and hovered TextField #145897

Description

@bleroux

Steps to reproduce

  1. Launch the code sample
  2. Move the mouse to hover or unhover the text field

Expected results

The input border color should be the one for focused state wheter the field is hovered or not:

image

Actual results

The input border color changes depending on the hovered state:
image

(as a long as the text field is focused the border color should not change).

Code sample

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

void main() async {
  runApp(
    const MaterialApp(
      title: 'Flutter Demo',
      home: MyApp(),
    ),
  );
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return const Scaffold(
      body: Center(
        child: TextField(
          decoration: InputDecoration(border: OutlineInputBorder()),
        ),
      ),
    );
  }
}

Screenshots or Video

Screenshots / Video demonstration

[Upload media here]

Logs

No response

Flutter Doctor output

Doctor output
[✓] Flutter (Channel master, 3.19.0-3.0.pre.1360, on Ubuntu 23.10
    6.5.0-26-generic, locale fr_FR.UTF-8)
    • Flutter version 3.19.0-3.0.pre.1360 on channel master at
      /home/bruno/Nevercode/flutter
    • Upstream repository [email protected]:NevercodeHQ/flutter.git
    • FLUTTER_GIT_URL = [email protected]:NevercodeHQ/flutter.git
    • Framework revision 859a5ab0f5 (il y a 9 heures), 2024-03-28 00:11:23 -0400
    • Engine revision b3516c4c56
    • Dart version 3.4.0 (build 3.4.0-279.0.dev)
    • DevTools version 2.34.0-dev.12

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
    • Android SDK at /media/oldhome/Android/Sdk
    • Platform android-34, build-tools 33.0.2
    • ANDROID_HOME = /media/oldhome/Android/Sdk
    • Java binary at: /media/oldhome/Produits/android-studio/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • Chrome at google-chrome

[✓] Linux toolchain - develop for Linux desktop
    • Ubuntu clang version 16.0.6 (15)
    • cmake version 3.27.4
    • ninja version 1.11.1
    • pkg-config version 1.8.1

[✓] Android Studio (version 2021.3)
    • Android Studio at /media/oldhome/Produits/android-studio
    • 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.13+0-b1751.21-8125866)

[✓] VS Code (version 1.87.2)
    • VS Code at /snap/code/current/usr/share/code
    • Flutter extension version 3.84.0

[✓] Connected device (2 available)
    • Linux (desktop) • linux  • linux-x64      • Ubuntu 23.10 6.5.0-26-generic
    • Chrome (web)    • chrome • web-javascript • Google Chrome 122.0.6261.111

[✓] Network resources
    • All expected network resources are available.

• No issues found!

Activity

  1. added
    in triagePresently being triaged by the triage team
    on Mar 28, 2024
  2. self-assigned this
    on Mar 28, 2024
  3. moved this from To do to In progress in Nevercodeon Mar 28, 2024
  4. added
    a: text inputEntering text in a text field or keyboard related problems
    frameworkflutter/packages/flutter repository. See also f: labels.
    p: material_uimaterial_ui package in flutter/packages
    has reproducible stepsThe issue has been confirmed reproducible and is ready to work on
    P2Important issues not at the top of the work list
    and removed
    in triagePresently being triaged by the triage team
    on Mar 28, 2024
  5. moved this from In progress to Done (PR merged) in Nevercodeon Apr 2, 2024
  6. added
    r: fixedIssue is closed as already fixed in a newer version
    on Apr 2, 2024
  7. github-actions commented on Apr 16, 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.

  8. locked as resolved and limited conversation to collaborators on Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work lista: text inputEntering text in a text field or keyboard related problemsfound in release: 3.19Found to occur in 3.19found in release: 3.21Found to occur in 3.21frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onp: material_uimaterial_ui package in flutter/packagesr: fixedIssue is closed as already fixed in a newer versionteam-text-inputOwned by Text Input team

Type

No type

Projects

  • Status
    Done (PR merged)

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions