Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[web] - Fix inputmode on Android Firefox #46901

Merged
merged 6 commits into from
Feb 8, 2024

Conversation

htoor3
Copy link
Contributor

@htoor3 htoor3 commented Oct 13, 2023

The wrong keyboard type shows when users specify the phone input type in the framework.

This is happening because:

  • We usually set inputmode for mobile text editing strategies.
  • We only use Android's text editing strategy for Blink browser engines (not firefox), so we fall through to the Firefox text editing strategy which I believe should only be used for desktop firefox.
  • So we're ending up in a case where Android + Firefox doesn't set the inputmode and it pops open the default alphanumeric keyboard

Fixes flutter/flutter#136351

Pre-launch Checklist

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • I read the [Tree Hygiene] wiki page, which explains my responsibilities.
  • I read and followed the [Flutter Style Guide] and the [C++, Objective-C, Java style guides].
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or the PR is [test-exempt]. See [testing the engine] for instructions on writing and running engine tests.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the [CLA].
  • All existing and new tests are passing.

@github-actions github-actions bot added the platform-web Code specifically for the web engine label Oct 13, 2023
@@ -1936,7 +1936,7 @@ DefaultTextEditingStrategy createDefaultTextEditingStrategy(HybridTextEditing te
strategy = IOSTextEditingStrategy(textEditing);
} else if (browserEngine == BrowserEngine.webkit) {
strategy = SafariDesktopTextEditingStrategy(textEditing);
} else if (browserEngine == BrowserEngine.blink &&
} else if ((browserEngine == BrowserEngine.blink || browserEngine == BrowserEngine.firefox) &&
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is there a contextual reason why we have to specify a browser engine as well as the OS when we're trying to select for a mobile text editing strategy? Or can we just always choose the android strategy when OS == android and always choose ios strategy when OS == iOS

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it makes sense to remove the browser engine check here and see what happens.

One thing to keep in mind is that on iOS, all browsers have to use the Webkit engine under the hood (because iOS doesn't allow apps to ship their own JIT, and all browsers need a JIT, so they have to use Webkit from iOS). On Android, this isn't the case.

@htoor3 htoor3 requested a review from mdebbar October 13, 2023 19:06
@flutter-dashboard
Copy link

This pull request executed golden file tests, but it has not been updated in a while (20+ days). Test results from Gold expire after as many days, so this pull request will need to be updated with a fresh commit in order to get results from Gold.

Copy link
Contributor

@mdebbar mdebbar left a comment

Choose a reason for hiding this comment

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

LGTM!

@htoor3 htoor3 added the autosubmit Merge PR when tree becomes green via auto submit App label Feb 8, 2024
@auto-submit auto-submit bot merged commit 6f5b6a3 into flutter:main Feb 8, 2024
28 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Feb 8, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Feb 8, 2024
…143183)

flutter/engine@fb99a84...6f5b6a3

2024-02-08 110993981+htoor3@users.noreply.github.com [web] - Fix `inputmode` on Android Firefox (flutter/engine#46901)
2024-02-08 bdero@google.com [Impeller] Vulkan: Don't fail initialization if stencil-only textures aren't supported. (flutter/engine#50455)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC chinmaygarde@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosubmit Merge PR when tree becomes green via auto submit App platform-web Code specifically for the web engine
Projects
None yet
2 participants