alexeyinkin commented on code in PR #26933:
URL: https://github.com/apache/beam/pull/26933#discussion_r1223791813
##########
learning/tour-of-beam/frontend/lib/pages/tour/widgets/playground.dart:
##########
@@ -57,6 +57,7 @@ class PlaygroundWidget extends StatelessWidget {
SplitView(
direction: Axis.vertical,
first: SnippetEditor(
+ autofocus: true,
Review Comment:
It is this bug: https://github.com/flutter/flutter/issues/106664
It will not let the user click out of the iframe if a text field is focused
in the iframe.
The workaround we had for months is this package:
https://pub.dev/packages/akvelon_flutter_issue_106664_workaround
It de-focuses any text field when the mouse is moved out of the iframe:
https://github.com/akvelon/flutter-issue-106664-workaround/blob/main/lib/src/web.dart
What we have just discovered is that this workaround does not work when the
playground is created when the mouse is initially out of the iframe. You can
see this bug on the website stage for this PR. It will be gone when the
playground is deployed from this PR.
So the solution is to auto-focus only in the standalone playground, and not
in the embedded playground. This is what this change does.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]