Repository: flutter
Issue: [web] Enter key event is not called in the FocusNode's onKey
Labels: a: text input,framework,engine,f: material design,platform-web,has reproducible steps,P2,found in release: 3.7,found in release: 3.9,team-web,triaged-web

<!-- Thank you for using Flutter!

     If you are looking for support, please check out our documentation
     or consider asking a question on Stack Overflow:
      * https://flutter.dev/
      * https://api.flutter.dev/
      * https://stackoverflow.com/questions/tagged/flutter?sort=frequent

     If you have found a bug or if our documentation doesn't have an answer
     to what you're looking for, then fill out the template below. Please read
     our guide to filing a bug first: https://flutter.dev/docs/resources/bug-reports
-->

## Steps to Reproduce

<!-- You must include full steps to reproduce so that we can reproduce the problem. -->



<details> 
<summary>minimal code sample</summary> 

```dart
import 'package:flutter/material.dart';

class Test extends StatefulWidget {
  static const routeName = 'test';

  @override
  _TestState createState() => _TestState();
}

class _TestState extends State<Test> {
  FocusNode _textFocus;

  @override
  void dispose() {
    _textFocus.dispose();
    super.dispose();
  }

  @override
  void initState() {
    _textFocus = FocusNode();
    super.initState();
  }
  final firstFocus = FocusNode(onKey: (FocusNode focusNode, RawKeyEvent event) {
    print('first');
    return false;
  });

  final secondFocus =
      FocusNode(onKey: (FocusNode focusNode, RawKeyEvent event) {
    print('second');
    return false;
  });

  @override
  Widget build(BuildContext context) {
    _textFocus.requestFocus();

    return Scaffold(
      appBar: AppBar(
        title: Text('PlutoGrid'),
      ),
      body: RawKeyboardListener(
        focusNode: firstFocus,
        child: Container(
          width: 100,
          height: 80,
          child: RawKeyboardListener(
            focusNode: secondFocus,
            child: TextField(
              focusNode: _textFocus,
              // textInputAction: TextInputAction.none,
              readOnly: true,
              onTap: () {
                print('tap');
              },
              onSubmitted: (String value) {
                print('submitted');
              },
            ),
          ),
        ),
      ),
    );
  }
}
``` 
	
</details>

1. Execute the attached example, put the focus on the TextField in the Web and press the Enter key.
2. check print



**Expected results:** <!-- what did you want to see? -->

submitted
second
first
second
first

**Actual results:** <!-- what did you see? -->

submitted

<details>
  <summary>Logs</summary>

<!--
      Run your application with `flutter run --verbose` and attach all the
      log output below between the lines with the backticks. If there is an
      exception, please see if the error message includes enough information
      to explain how to solve the issue.
-->

```
[ +105 ms] executing: [C:\flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H
[  +62 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[        ] 2032a448edd0da6460250f7d099d324a5989957f
[   +1 ms] executing: [C:\flutter/] git tag --points-at HEAD
[  +47 ms] Exit code 0 from: git tag --points-at HEAD
[   +1 ms] executing: [C:\flutter/] git describe --match *.*.* --first-parent --long --tags
[  +66 ms] Exit code 0 from: git describe --match *.*.* --first-parent --long --tags
[        ] 1.22.0-9.0.pre-65-g2032a448e
[  +11 ms] executing: [C:\flutter/] git rev-parse --abbrev-ref --symbolic @{u}
[  +39 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[        ] origin/master
[        ] executing: [C:\flutter/] git ls-remote --get-url origin
[  +39 ms] Exit code 0 from: git ls-remote --get-url origin
[        ] https://github.com/flutter/flutter.git
[ +282 ms] Unable to locate an Android SDK.
[   +4 ms] executing: [C:\flutter/] git rev-parse --abbrev-ref HEAD
[  +36 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[        ] master
[  +49 ms] Artifact Instance of 'AndroidMavenArtifacts' is not required, skipping update.
[   +1 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[   +1 ms] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[   +3 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[  +55 ms] Artifact Instance of 'AndroidMavenArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[   +4 ms] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[  +54 ms] Multiple devices found:
[  +23 ms] Windows (desktop) • windows    • windows-x64    • Microsoft Windows [Version 10.0.18362.778]
[   +3 ms] Web Server (web)  • web-server • web-javascript • Flutter Tools
[   +1 ms] Chrome (web)      • chrome     • web-javascript • Google Chrome 85.0.4183.83
[   +2 ms] [0]: Windows (windows)
[        ] [1]: Web Server (web-server)
[        ] [2]: Chrome (chrome)
[   +1 ms] Please choose one (To quit, press "q/Q")
[        ] : 
[+12560 ms] 2
[ +193 ms] Generating C:\Users\kmk\IdeaProjects\pluto_grid\example\android\app\src\main\java\io\flutter\plugins\GeneratedPluginRegistrant.java
[  +75 ms] Launching lib\main.dart on Chrome in debug mode...
[  +44 ms] Updating assets
[  +92 ms] Manifest contained wildcard assets. Inserting missing file into build graph to force rerun. for more information see #56466.
[   +5 ms] Syncing files to device Chrome...
[  +41 ms] Generating C:\Users\kmk\IdeaProjects\pluto_grid\example\android\app\src\main\java\io\flutter\plugins\GeneratedPluginRegistrant.java
[  +52 ms] <- reset
[   +6 ms] C:\flutter\bin\cache\dart-sdk\bin\dart.exe --disable-dart-dev C:\flutter\bin\cache\artifacts\engine\windows-x64\frontend_server.dart.snapshot --sdk-root C:\flutter\bin\cache\flutter_web_sdk/ --incremental
--target=dartdevc --debugger-module-names --experimental-emit-debug-metadata -Ddart.developer.causal_async_stacks=true --output-dill C:\Users\kmk\AppData\Local\Temp\flutter_tools.f2c0189d\flutter_tool.c04cd6ea\app.dill
--libraries-spec file:///C:/flutter/bin/cache/flutter_web_sdk/libraries.json --packages .packages -Ddart.vm.profile=false -Ddart.vm.product=false
--bytecode-options=source-positions,local-var-info,debugger-stops,instance-field-initializers,keep-unreachable-code,avoid-closure-call-instructions --enable-asserts --track-widget-creation --filesystem-root
C:\Users\kmk\AppData\Local\Temp\flutter_tools.f2c0189d\flutter_tools.36447d07 --filesystem-scheme org-dartlang-app --initialize-from-dill build\cache.dill.track.dill --platform
file:///C:/flutter/bin/cache/flutter_web_sdk/kernel/flutter_ddc_sdk.dill
[  +11 ms] <- compile org-dartlang-app:/web_entrypoint.dart
[+14942 ms] Syncing files to device Chrome... (completed in 15,045ms, longer than expected)
[   +1 ms] Synced 28.8MB.
[        ] <- accept
[        ] Caching compiled dill
[ +347 ms] [CHROME]:
[   +4 ms] [CHROME]:DevTools listening on ws://127.0.0.1:63713/devtools/browser/edc21a92-8a6c-4875-944c-20e3d416c810
[+7433 ms] Debug service listening on ws://127.0.0.1:63735/dTsFlujXmUI=

[ +236 ms] Debug service listening on ws://127.0.0.1:63735/dTsFlujXmUI=
[   +2 ms] Warning: Flutter's support for web development is not stable yet and hasn't
[        ] been thoroughly tested in production environments.
[        ] For more information see https://flutter.dev/web
[        ]   To hot restart changes while running, press "r" or "R".
[        ] For a more detailed help message, press "h". To quit, press "q".
[ +968 ms] ══╡ EXCEPTION CAUGHT BY FOUNDATION LIBRARY ╞════════════════════════════════════════════════════════
[   +4 ms] The following assertion was thrown while dispatching notifications for FocusNode:
[   +1 ms] Assertion failed: file:///C:/flutter/packages/flutter/lib/src/rendering/box.dart:1785:12
[        ] hasSize
[        ] "RenderBox was not laid out: RenderEditable#762e0 NEEDS-LAYOUT NEEDS-PAINT"
[   +1 ms] When the exception was thrown, this was the stack:
[        ] C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 212:49  throw_
[        ] C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 24:3    assertFailed
[   +1 ms] packages/flutter/src/rendering/box.dart 1785:12                                                                            get size
[        ] packages/flutter/src/widgets/editable_text.dart 2264:40                                                                    [_updateSizeAndTransform]
[        ] packages/flutter/src/widgets/editable_text.dart 1900:7                                                                     [_openInputConnection]
[        ] packages/flutter/src/widgets/editable_text.dart 1933:7                                                                     [_openOrCloseInputConnectionIfNeeded]
[        ] packages/flutter/src/widgets/editable_text.dart 2241:5                                                                     [_handleFocusChanged]
[        ] packages/flutter/src/foundation/change_notifier.dart 226:16                                                                notifyListeners
[        ] packages/flutter/src/widgets/focus_manager.dart 1027:5                                                                     [_notify]
[        ] packages/flutter/src/widgets/focus_manager.dart 1723:11                                                                    [_applyFocusChange]
[        ] C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/async/schedule_microtask.dart 41:11                              _microtaskLoop
[   +1 ms] C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/async/schedule_microtask.dart 50:5                               _startMicrotaskLoop
[   +1 ms] C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 166:15           <fn>
[   +2 ms] The FocusNode sending notification was:
[        ]   FocusNode#43ad7([PRIMARY FOCUS])
[        ] ════════════════════════════════════════════════════════════════════════════════════════════════════
[+4207 ms] tap
[+1768 ms] submitted
```

<!--
     Run `flutter analyze` and attach any output of that command below.
     If there are any analysis errors, try resolving them before filing this issue.
-->

```
Analyzing example...

   info - Unused import: 'package:example/widget/main_drawer.dart' - lib\screen\dual_grid_screen.dart:1:8 - unused_import
   info - Unused import: 'package:example/widget/main_drawer.dart' - lib\screen\normal_grid_screen.dart:1:8 - unused_import

2 issues found. (ran in 9.8s)

```

<!-- Finally, paste the output of running `flutter doctor -v` here. -->

```
[√] Flutter (Channel master, 1.22.0-10.0.pre.65, on Microsoft Windows [Version 10.0.18362.778], locale ko-KR)
    • Flutter version 1.22.0-10.0.pre.65 at C:\flutter
    • Framework revision 2032a448ed (6 hours ago), 2020-09-02 23:36:19 -0700
    • Engine revision 165abef0a2
    • Dart version 2.10.0 (build 2.10.0-77.0.dev)

[X] Android toolchain - develop for Android devices
    X Unable to locate Android SDK.
      Install Android Studio from: https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK components.
      (or visit https://flutter.dev/docs/get-started/install/windows#android-setup for detailed instructions).
      If the Android SDK has been installed to a custom location, set ANDROID_SDK_ROOT to that location.
      You may also want to add it to your PATH environment variable.


[√] Chrome - develop for the web
    • Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.7.1)
    • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
    • Visual Studio Community 2019 version 16.7.30406.217
    • Windows 10 SDK version 10.0.18362.0

[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/docs/get-started/install/windows#android-setup for detailed instructions).

[√] Connected device (3 available)
    • Windows (desktop) • windows    • windows-x64    • Microsoft Windows [Version 10.0.18362.778]
    • Web Server (web)  • web-server • web-javascript • Flutter Tools
    • Chrome (web)      • chrome     • web-javascript • Google Chrome 85.0.4183.83

! Doctor found issues in 2 categories.
```

</details>