Skip to content

Conversation

@yjbanov
Copy link
Contributor

@yjbanov yjbanov commented Apr 9, 2025

Fixes #155265

This includes 2 fixes:

  • When the window/iframe loses focus, close the text input connection instead of grabbing the focus again.
  • Do not enable semantics using the placeholder when moving focus using the "Tab" key.

Bonus: remove the no longer necessary ViewFocusBinding.isEnabled (doesn't fix any issues, just a clean-up).

@yjbanov yjbanov requested review from ditman and tugorez April 9, 2025 00:44
@github-actions github-actions bot added a: text input Entering text in a text field or keyboard related problems engine flutter/engine related. See also e: labels. a: accessibility Accessibility, e.g. VoiceOver or TalkBack. (aka a11y) platform-web Web applications specifically f: focus Focus traversal, gaining or losing focus labels Apr 9, 2025
Copy link
Member

@ditman ditman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR seems to be fixing 3 different problems/issues. Please make its description a little bit nicer, if you're planning on landing this! :

(And don't block on anything I've said :P)

Comment on lines +82 to +88
// Simply tabbing into the placeholder element should not cause semantics
// to be enabled. The user should actually click on the placeholder.
if (event.isA<DomKeyboardEvent>()) {
event as DomKeyboardEvent;
if (event.key == 'Tab') {
return true;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand this comment, it says "simply by tabbing should not cause semantics to be enabled" but then it returns true if event.key is 'Tab'?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a fix for a different issue, please list it in the "Fixes" of the description of this PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The name of the method - shouldEnableSemantics - is misleading. true return value means "yes, forward the event to the framework; do not consume it". I plan to do some renaming, but not in this PR. The reason I included it in this PR is because as I was testing focus functionality I noticed that stumbling upon the placeholder threw off focus management because it enabled semantics and completely changed the DOM structure. With this fix I can cleanly leave and re-enter the iframe that hosts the Flutter app.

@yjbanov yjbanov requested a review from ditman April 9, 2025 17:06
@yjbanov yjbanov force-pushed the i155265-release-text-input-focus branch 2 times, most recently from b357aef to f099c79 Compare April 9, 2025 23:53
@yjbanov yjbanov force-pushed the i155265-release-text-input-focus branch from f099c79 to 900a05d Compare April 9, 2025 23:55
Copy link
Member

@ditman ditman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Please fix the TODO to comply with the Flutter styleguide though!

Comment on lines +656 to +660
// This is a mysterious behavior in Firefox. Even though the engine does
// call <input>.focus() the browser doesn't move focus to the target
// element. This only happens in the test harness. When testing
// manually, Firefox happily moves focus to the input element.
expect(domDocument.activeElement, flutterView.dom.rootElement);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, at least it behaves the same as Safari :P

// If the focus stays within the same FlutterView, ensure the focus stays
// on the input element.

// TODO(166857): the motivation/reasoning behind this remains murky.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, follow the style guide for flutter TODOs:

TODOs should include the string TODO in all caps, followed by the GitHub username of the person with the best context about the problem referenced by the TODO in parentheses. A TODO is not a commitment that the person referenced will fix the problem, it is intended to be the person with enough context to explain the problem. Thus, when you create a TODO, it is almost always your username that is given.

Suggested change
// TODO(166857): the motivation/reasoning behind this remains murky.
// TODO(yjbanov): Make text input less grabby. See: https://github.com/flutter/flutter/issues/166857
// The motivation/reasoning behind whay this is needed is murky.

_callback = (String channel, ByteData? data, PlatformMessageResponseCallback? callback) {
messages.add(PlatformMessage(channel, const JSONMethodCodec().decodeMethodCall(data)));
if (channel == 'flutter/lifecycle') {
strings.add(PlatformStringMessage(channel, const StringCodec().decodeMessage(data!)));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we even using the strings anywhere in tests? Or is this to be able to listen to all channels, even flutter/lifecycle?

@ksokolovskyi
Copy link
Contributor

ksokolovskyi commented Apr 14, 2025

Hi @yjbanov @ditman!

While working on the fix for #157579 I noticed this PR and tried it locally. It works well with the one-line fields, but unfortunately, the multiline text field editing is now broken.
When I tap Enter in the multiline text field, it gets unfocused.

Master This PR
stable.mov
pr.mov

There is an AssertionError in the console:

error.mov

Assertion Error
Uncaught (in promise) DartError: Assertion failed: org-dartlang-sdk:///lib/_engine/engine/text_editing/text_editing.dart:1232:7
domElement != null
"The DOM element of this text editing strategy is not currently active."
    at Object.throw_ [as throw] (errors.dart:266:3)
    at Object.assertFailed (profile.dart:117:39)
    at get activeDomElement (profile.dart:117:39)
    at _engine.GloballyPositionedTextEditingStrategy.new.moveFocusToActiveDomElement (text_editing.dart:1628:5)
    at _engine.GloballyPositionedTextEditingStrategy.new.placeElement (text_editing.dart:1141:7)
    at _engine.GloballyPositionedTextEditingStrategy.new.updateElementPlacement (text_editing.dart:1390:9)
    at _engine.TextInputSetEditableSizeAndTransform.new.run (text_editing.dart:2056:16)
    at _engine.HybridTextEditing.new.acceptCommand (text_editing.dart:2359:12)
    at _engine.TextEditingChannel.new.handleTextInput (text_editing.dart:2246:5)
    at [_sendPlatformMessage] (platform_dispatcher.dart:551:21)
    at _engine.EnginePlatformDispatcher.new.sendPlatformMessage (platform_dispatcher.dart:357:5)
    at _DefaultBinaryMessenger.send (binding.dart:625:27)
    at platform_channel.dart:363:37
    at async_patch.dart:622:19
    at async_patch.dart:647:23
    at Object._asyncStartSync (async_patch.dart:541:3)
    at [_invokeMethod] (platform_channel.dart:354:14)
    at platform_channel.dart:637:18
    at async_patch.dart:622:19
    at async_patch.dart:647:23
    at Object._asyncStartSync (async_patch.dart:541:3)
    at OptionalMethodChannel.invokeMethod (platform_channel.dart:636:14)
    at text_input._PlatformTextInputControl.__.setEditableSizeAndTransform (text_input.dart:2490:5)
    at [_setEditableSizeAndTransform] (text_input.dart:2182:14)
    at text_input.TextInputConnection.__.setEditableSizeAndTransform (text_input.dart:1585:17)
    at [_updateSizeAndTransform] (editable_text.dart:4681:5)
    at [_compositeCallback] (editable_text.dart:4673:5)
    at tear (operations.dart:110:68)
    at layer.dart:235:7
    at [_fireCompositionCallbacks] (layer.dart:178:7)
    at [_fireCompositionCallbacks] (layer.dart:1080:11)
    at layer.OffsetLayer.new.detach (layer.dart:1214:5)
    at [_dropChild] (layer.dart:1336:12)
    at layer.OffsetLayer.new.removeAllChildren (layer.dart:1349:7)
    at PaintingContext._repaintCompositedChild (object.dart:156:17)
    at PaintingContext.repaintCompositedChild (object.dart:121:5)
    at object$.PipelineOwner.new.flushPaint (object.dart:1312:31)
    at binding$5._DefaultRootPipelineOwner.new.flushPaint (object.dart:1322:14)
    at binding$4.WidgetsFlutterBinding.new.drawFrame (binding.dart:631:5)
    at binding$4.WidgetsFlutterBinding.new.drawFrame (binding.dart:1231:13)
    at [_handlePersistentFrameCallback] (binding.dart:495:5)
    at tear (operations.dart:110:68)
    at [_invokeFrameCallback] (binding.dart:1438:7)
    at binding$4.WidgetsFlutterBinding.new.handleDrawFrame (binding.dart:1351:9)
    at [_handleDrawFrame] (binding.dart:1204:5)
    at tear (operations.dart:110:68)
    at Object.invoke (platform_dispatcher.dart:1312:5)
    at _engine.EnginePlatformDispatcher.new.invokeOnDrawFrame (platform_dispatcher.dart:255:5)
    at [_renderFrame] (frame_service.dart:189:32)
    at frame_service.dart:101:9
    at _RootZone.runUnary (zone.dart:1849:54)
    at zone.dart:1804:26
    at Object._callDartFunctionFast1 (js_allow_interop_patch.dart:224:27)
    at ret (js_allow_interop_patch.dart:84:15)
Sample Code
import 'package:flutter/material.dart';

void main() async {
  runApp(
    MaterialApp(
      home: Screen(),
    ),
  );
}

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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: TextField(
          minLines: 1,
          maxLines: null,
        ),
      ),
    );
  }
}

@yjbanov
Copy link
Contributor Author

yjbanov commented Apr 14, 2025

@ksokolovskyi Thanks for the heads up! I'll test this scenario.

@mdebbar
Copy link
Contributor

mdebbar commented Apr 16, 2025

I'm taking over this PR.

@ksokolovskyi I think I fixed the issue you encountered. Would you mind checking again please?

Comment on lines 173 to 176
final host = view!.dom.textEditingHost;
if (!host.contains(element)) {
host.append(element);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, this prevents blurs because the element gets "moved" in the DOM when already inserted? I think this deserves a small comment so it doesn't get "optimized" in the future :P

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exactly. Yes a comment is in order.

@ksokolovskyi
Copy link
Contributor

I'm taking over this PR.

@ksokolovskyi I think I fixed the issue you encountered. Would you mind checking again please?

Hi @mdebbar, I was not able to reproduce the issue on Chrome, Safari, and Firefox. Thanks for the fix!

@kevmoo
Copy link
Contributor

kevmoo commented Apr 16, 2025

@ksokolovskyi – thank you SO MUCH for following along closely and verifying!

@mdebbar mdebbar added the autosubmit Merge PR when tree becomes green via auto submit App label Apr 17, 2025
@auto-submit auto-submit bot added this pull request to the merge queue Apr 18, 2025
Merged via the queue into flutter:master with commit 7ca63fa Apr 18, 2025
176 of 177 checks passed
@flutter-dashboard flutter-dashboard bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Apr 18, 2025
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Apr 20, 2025
flutter/flutter@3ed38e2...cfb887c

2025-04-20 [email protected] Roll Fuchsia Linux SDK from 0U_vEALFF7qRJZ_cE... to RGmU4KeQhrxqE7hsr... (flutter/flutter#167447)
2025-04-19 [email protected] Roll Skia from 3dc3ffeb45f0 to bd9ef4955aad (1 revision) (flutter/flutter#167434)
2025-04-19 [email protected] Roll Fuchsia Linux SDK from MwYckh5OvwwmIYLx0... to 0U_vEALFF7qRJZ_cE... (flutter/flutter#167430)
2025-04-19 [email protected] Roll Skia from 177a2929e32f to 3dc3ffeb45f0 (1 revision) (flutter/flutter#167428)
2025-04-19 [email protected] Revert "Reduce app startup latency by initializing the engine on a separate thread (#166918)" (flutter/flutter#167427)
2025-04-18 [email protected] Fix keyboard cover SearchAnchor list results (flutter/flutter#165382)
2025-04-18 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Mark `windows_host_engine_test` flaky (#167419)" (flutter/flutter#167425)
2025-04-18 [email protected] Docs: Update date picker theme day color properties doc (flutter/flutter#166122)
2025-04-18 [email protected] Add ktlint test for generated files from templates (flutter/flutter#167378)
2025-04-18 [email protected] Revert "[Windows] Enable merged platform and UI thread by default" (flutter/flutter#167420)
2025-04-18 [email protected] Add a DrivenScrollActivity.simulation constructor (flutter/flutter#166730)
2025-04-18 [email protected] Added missing period for consistency and readability (flutter/flutter#162887)
2025-04-18 [email protected] Roll Skia from 6c4595124690 to 177a2929e32f (1 revision) (flutter/flutter#167417)
2025-04-18 [email protected] Fix codesigning for `Mac_arm64_ios imitation_game_flutter` (flutter/flutter#167307)
2025-04-18 [email protected] Mark `windows_host_engine_test` flaky (flutter/flutter#167419)
2025-04-18 [email protected] Roll Dart SDK from ab60afc99bcb to 0cfefe2a03fb (1 revision) (flutter/flutter#167414)
2025-04-18 [email protected] [web] close input connection when window/iframe loses focus (flutter/flutter#166804)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC [email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
raju-muliyashiya pushed a commit to raju-muliyashiya/flutter_packages that referenced this pull request Apr 26, 2025
…r#9118)

flutter/flutter@3ed38e2...cfb887c

2025-04-20 [email protected] Roll Fuchsia Linux SDK from 0U_vEALFF7qRJZ_cE... to RGmU4KeQhrxqE7hsr... (flutter/flutter#167447)
2025-04-19 [email protected] Roll Skia from 3dc3ffeb45f0 to bd9ef4955aad (1 revision) (flutter/flutter#167434)
2025-04-19 [email protected] Roll Fuchsia Linux SDK from MwYckh5OvwwmIYLx0... to 0U_vEALFF7qRJZ_cE... (flutter/flutter#167430)
2025-04-19 [email protected] Roll Skia from 177a2929e32f to 3dc3ffeb45f0 (1 revision) (flutter/flutter#167428)
2025-04-19 [email protected] Revert "Reduce app startup latency by initializing the engine on a separate thread (#166918)" (flutter/flutter#167427)
2025-04-18 [email protected] Fix keyboard cover SearchAnchor list results (flutter/flutter#165382)
2025-04-18 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Mark `windows_host_engine_test` flaky (#167419)" (flutter/flutter#167425)
2025-04-18 [email protected] Docs: Update date picker theme day color properties doc (flutter/flutter#166122)
2025-04-18 [email protected] Add ktlint test for generated files from templates (flutter/flutter#167378)
2025-04-18 [email protected] Revert "[Windows] Enable merged platform and UI thread by default" (flutter/flutter#167420)
2025-04-18 [email protected] Add a DrivenScrollActivity.simulation constructor (flutter/flutter#166730)
2025-04-18 [email protected] Added missing period for consistency and readability (flutter/flutter#162887)
2025-04-18 [email protected] Roll Skia from 6c4595124690 to 177a2929e32f (1 revision) (flutter/flutter#167417)
2025-04-18 [email protected] Fix codesigning for `Mac_arm64_ios imitation_game_flutter` (flutter/flutter#167307)
2025-04-18 [email protected] Mark `windows_host_engine_test` flaky (flutter/flutter#167419)
2025-04-18 [email protected] Roll Dart SDK from ab60afc99bcb to 0cfefe2a03fb (1 revision) (flutter/flutter#167414)
2025-04-18 [email protected] [web] close input connection when window/iframe loses focus (flutter/flutter#166804)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC [email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
androidseb pushed a commit to androidseb/packages that referenced this pull request Jun 8, 2025
…r#9118)

flutter/flutter@3ed38e2...cfb887c

2025-04-20 [email protected] Roll Fuchsia Linux SDK from 0U_vEALFF7qRJZ_cE... to RGmU4KeQhrxqE7hsr... (flutter/flutter#167447)
2025-04-19 [email protected] Roll Skia from 3dc3ffeb45f0 to bd9ef4955aad (1 revision) (flutter/flutter#167434)
2025-04-19 [email protected] Roll Fuchsia Linux SDK from MwYckh5OvwwmIYLx0... to 0U_vEALFF7qRJZ_cE... (flutter/flutter#167430)
2025-04-19 [email protected] Roll Skia from 177a2929e32f to 3dc3ffeb45f0 (1 revision) (flutter/flutter#167428)
2025-04-19 [email protected] Revert "Reduce app startup latency by initializing the engine on a separate thread (#166918)" (flutter/flutter#167427)
2025-04-18 [email protected] Fix keyboard cover SearchAnchor list results (flutter/flutter#165382)
2025-04-18 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Mark `windows_host_engine_test` flaky (#167419)" (flutter/flutter#167425)
2025-04-18 [email protected] Docs: Update date picker theme day color properties doc (flutter/flutter#166122)
2025-04-18 [email protected] Add ktlint test for generated files from templates (flutter/flutter#167378)
2025-04-18 [email protected] Revert "[Windows] Enable merged platform and UI thread by default" (flutter/flutter#167420)
2025-04-18 [email protected] Add a DrivenScrollActivity.simulation constructor (flutter/flutter#166730)
2025-04-18 [email protected] Added missing period for consistency and readability (flutter/flutter#162887)
2025-04-18 [email protected] Roll Skia from 6c4595124690 to 177a2929e32f (1 revision) (flutter/flutter#167417)
2025-04-18 [email protected] Fix codesigning for `Mac_arm64_ios imitation_game_flutter` (flutter/flutter#167307)
2025-04-18 [email protected] Mark `windows_host_engine_test` flaky (flutter/flutter#167419)
2025-04-18 [email protected] Roll Dart SDK from ab60afc99bcb to 0cfefe2a03fb (1 revision) (flutter/flutter#167414)
2025-04-18 [email protected] [web] close input connection when window/iframe loses focus (flutter/flutter#166804)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC [email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
FMorschel pushed a commit to FMorschel/packages that referenced this pull request Jun 9, 2025
…r#9118)

flutter/flutter@3ed38e2...cfb887c

2025-04-20 [email protected] Roll Fuchsia Linux SDK from 0U_vEALFF7qRJZ_cE... to RGmU4KeQhrxqE7hsr... (flutter/flutter#167447)
2025-04-19 [email protected] Roll Skia from 3dc3ffeb45f0 to bd9ef4955aad (1 revision) (flutter/flutter#167434)
2025-04-19 [email protected] Roll Fuchsia Linux SDK from MwYckh5OvwwmIYLx0... to 0U_vEALFF7qRJZ_cE... (flutter/flutter#167430)
2025-04-19 [email protected] Roll Skia from 177a2929e32f to 3dc3ffeb45f0 (1 revision) (flutter/flutter#167428)
2025-04-19 [email protected] Revert "Reduce app startup latency by initializing the engine on a separate thread (#166918)" (flutter/flutter#167427)
2025-04-18 [email protected] Fix keyboard cover SearchAnchor list results (flutter/flutter#165382)
2025-04-18 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Mark `windows_host_engine_test` flaky (#167419)" (flutter/flutter#167425)
2025-04-18 [email protected] Docs: Update date picker theme day color properties doc (flutter/flutter#166122)
2025-04-18 [email protected] Add ktlint test for generated files from templates (flutter/flutter#167378)
2025-04-18 [email protected] Revert "[Windows] Enable merged platform and UI thread by default" (flutter/flutter#167420)
2025-04-18 [email protected] Add a DrivenScrollActivity.simulation constructor (flutter/flutter#166730)
2025-04-18 [email protected] Added missing period for consistency and readability (flutter/flutter#162887)
2025-04-18 [email protected] Roll Skia from 6c4595124690 to 177a2929e32f (1 revision) (flutter/flutter#167417)
2025-04-18 [email protected] Fix codesigning for `Mac_arm64_ios imitation_game_flutter` (flutter/flutter#167307)
2025-04-18 [email protected] Mark `windows_host_engine_test` flaky (flutter/flutter#167419)
2025-04-18 [email protected] Roll Dart SDK from ab60afc99bcb to 0cfefe2a03fb (1 revision) (flutter/flutter#167414)
2025-04-18 [email protected] [web] close input connection when window/iframe loses focus (flutter/flutter#166804)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC [email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Ortes pushed a commit to Ortes/packages that referenced this pull request Jun 25, 2025
…r#9118)

flutter/flutter@3ed38e2...cfb887c

2025-04-20 [email protected] Roll Fuchsia Linux SDK from 0U_vEALFF7qRJZ_cE... to RGmU4KeQhrxqE7hsr... (flutter/flutter#167447)
2025-04-19 [email protected] Roll Skia from 3dc3ffeb45f0 to bd9ef4955aad (1 revision) (flutter/flutter#167434)
2025-04-19 [email protected] Roll Fuchsia Linux SDK from MwYckh5OvwwmIYLx0... to 0U_vEALFF7qRJZ_cE... (flutter/flutter#167430)
2025-04-19 [email protected] Roll Skia from 177a2929e32f to 3dc3ffeb45f0 (1 revision) (flutter/flutter#167428)
2025-04-19 [email protected] Revert "Reduce app startup latency by initializing the engine on a separate thread (#166918)" (flutter/flutter#167427)
2025-04-18 [email protected] Fix keyboard cover SearchAnchor list results (flutter/flutter#165382)
2025-04-18 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Mark `windows_host_engine_test` flaky (#167419)" (flutter/flutter#167425)
2025-04-18 [email protected] Docs: Update date picker theme day color properties doc (flutter/flutter#166122)
2025-04-18 [email protected] Add ktlint test for generated files from templates (flutter/flutter#167378)
2025-04-18 [email protected] Revert "[Windows] Enable merged platform and UI thread by default" (flutter/flutter#167420)
2025-04-18 [email protected] Add a DrivenScrollActivity.simulation constructor (flutter/flutter#166730)
2025-04-18 [email protected] Added missing period for consistency and readability (flutter/flutter#162887)
2025-04-18 [email protected] Roll Skia from 6c4595124690 to 177a2929e32f (1 revision) (flutter/flutter#167417)
2025-04-18 [email protected] Fix codesigning for `Mac_arm64_ios imitation_game_flutter` (flutter/flutter#167307)
2025-04-18 [email protected] Mark `windows_host_engine_test` flaky (flutter/flutter#167419)
2025-04-18 [email protected] Roll Dart SDK from ab60afc99bcb to 0cfefe2a03fb (1 revision) (flutter/flutter#167414)
2025-04-18 [email protected] [web] close input connection when window/iframe loses focus (flutter/flutter#166804)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC [email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
romanejaquez pushed a commit to romanejaquez/flutter that referenced this pull request Aug 14, 2025
…166804)

Fixes flutter#155265

This includes 2 fixes:

* When the window/iframe loses focus, close the text input connection
instead of grabbing the focus again.
* Do not enable semantics using the placeholder when moving focus using
the "Tab" key.

Bonus: remove the no longer necessary `ViewFocusBinding.isEnabled`
(doesn't fix any issues, just a clean-up).

---------

Co-authored-by: Mouad Debbar <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: accessibility Accessibility, e.g. VoiceOver or TalkBack. (aka a11y) a: text input Entering text in a text field or keyboard related problems engine flutter/engine related. See also e: labels. f: focus Focus traversal, gaining or losing focus platform-web Web applications specifically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Textfield with FocusNode Rendered within an iFrame on Web Refuses to Lose Focus

5 participants