Skip to content

[Firefox] macOS emoji picker doesn't input an emoji under Firefox to TextField due to focus being lost for too long #168588

@SleepySquash

Description

@SleepySquash

Steps to reproduce

  1. Focus into any TextField under Firefox browser on macOS device.
  2. Press Control + CMD + Space or fn + E to open up macOS emoji picker.
  3. Be sure that the emoji picker is in compact mode (displayed above the field and not floating around) - if not, click on the calendar looking button in the picker so that it shrinks down.
  4. Press on any emoji.
  5. Notice the emoji not being pasted.

This seems to be happening due to TextField losing focus for too long, since if after the 4th step you manually press into the TextField, then the emoji is pasted.

Expected results

Emoji is pasted into the TextField (like it does under any other browser or in macOS application).

Actual results

Emoji is not pasted.

Code sample

Code sample

I am running this code with the following command: flutter run -d web-server --web-hostname=0.0.0.0 --web-port=8080 and then open the http://localhost:8080 URL in Firefox.

import 'package:flutter/material.dart';

void main() {
  runApp(MaterialApp(home: Scaffold(body: Center(child: TextField()))));
}

Screenshots or Video

Screenshots / Video demonstration
Screen.Recording.2025-05-09.at.11.43.19.mp4

Notice that manually pressing on the TextField fixes the issue, so it indeed seems that the problem lies within TextField being unfocused by Firefox for too long that it doesn't receive the emoji picked.

Logs

Logs
12:25:55.338 Loading from existing service worker. [flutter_bootstrap.js:3:659](http://localhost:8080/flutter_bootstrap.js)
12:25:55.339 Service worker already active. [flutter_bootstrap.js:3:907](http://localhost:8080/flutter_bootstrap.js)
12:25:55.339 Injecting <script> tag. Using callback. [flutter_bootstrap.js:1:1846](http://localhost:8080/flutter_bootstrap.js)
12:25:56.107 registerExtension() from dart:developer is only supported in build/run/test environments where the developer event method hooks have been set by package:dwds v11.1.0 or higher. [developer_patch.dart:96:6](http://localhost:8080/dart-sdk/lib/_internal/js_dev_runtime/patch/developer_patch.dart)
12:25:56.284 Source map error: Error: JSON.parse: unexpected character at line 1 column 1 of the JSON data
Stack in the worker:parseSourceMapInput@resource://devtools/client/shared/vendor/source-map/lib/util.js:163:15
_factory@resource://devtools/client/shared/vendor/source-map/lib/source-map-consumer.js:1066:22
SourceMapConsumer@resource://devtools/client/shared/vendor/source-map/lib/source-map-consumer.js:26:12
_fetch@resource://devtools/client/shared/source-map-loader/utils/fetchSourceMap.js:83:19

Resource URL: http://localhost:8080/flutter_bootstrap.js
Source Map URL: flutter.js.map

12:25:56.370 WEBGL_debug_renderer_info is deprecated in Firefox and will be removed. Please use RENDERER. 2 [canvaskit.js:15:383](https://www.gstatic.com/flutter-canvaskit/cf56914b326edb0ccb123ffdc60f00060bd513fa/canvaskit.js)

Flutter Doctor output

Doctor output
[✓] Flutter (Channel stable, 3.29.3, on macOS 15.4.1 24E263 darwin-arm64, locale en-US) [1,447ms]
    • Flutter version 3.29.3 on channel stable at /opt/homebrew/Caskroom/flutter/3.29.0/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision ea121f8859 (4 weeks ago), 2025-04-11 19:10:07 +0000
    • Engine revision cf56914b32
    • Dart version 3.7.2
    • DevTools version 2.42.3

[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0) [2.6s]
    • Android SDK at /Users/mayday/Library/Android/sdk
    • Platform android-35, build-tools 35.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
      This is the JDK bundled with the latest Android Studio installation on this machine.
      To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.
    • Java version OpenJDK Runtime Environment (build 21.0.3+-79915917-b509.11)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 16.3) [1,430ms]
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 16E140
    • CocoaPods version 1.16.2

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

[✓] Android Studio (version 2024.2) [18ms]
    • 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 21.0.3+-79915917-b509.11)

[✓] VS Code (version 1.100.0) [15ms]
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.111.20250501

[✓] Connected device (4 available) [6.5s]
    • iPhone (wireless) (mobile)      • 00008020-00063D1A0221002E • ios            • iOS 18.4.1 22E252
    • macOS (desktop)                 • macos                     • darwin-arm64   • macOS 15.4.1 24E263 darwin-arm64
    • Mac Designed for iPad (desktop) • mac-designed-for-ipad     • darwin         • macOS 15.4.1 24E263 darwin-arm64
    • Chrome (web)                    • chrome                    • web-javascript • Google Chrome 136.0.7103.93
    ! Error: iPad Pro is not available because it is unpaired. Pair with the device in the Xcode Devices Window, and respond to any pairing prompts on the device. (code -29)

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

• No issues found!

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: text inputEntering text in a text field or keyboard related problemsbrowser: firefoxonly manifests in Firefoxfound in release: 3.29Found to occur in 3.29found in release: 3.32Found to occur in 3.32has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-macBuilding on or for macOS specificallyplatform-webWeb applications specificallyteam-webOwned by Web platform teamtriaged-webTriaged by Web platform team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions