Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

mdebbar
Copy link
Contributor

@mdebbar mdebbar commented Oct 27, 2022

When (forced-colors: active) is enabled in Chrome settings, it messes with the trasnparent styles that we set on text fields. This PR adds forced-color-adjust: none; to prevent that.

@mdebbar mdebbar requested review from yjbanov and htoor3 October 27, 2022 21:01
@flutter-dashboard flutter-dashboard bot added the platform-web Code specifically for the web engine label Oct 27, 2022
@yjbanov yjbanov requested a review from nbayati October 27, 2022 21:11
Copy link
Contributor

@yjbanov yjbanov left a comment

Choose a reason for hiding this comment

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

LGTM if LGT @nbayati

@nbayati
Copy link
Contributor

nbayati commented Oct 28, 2022

My only question is around the context of invisible text fields. What is the use case and why we're setting everything to transparent in the first place?

@mdebbar
Copy link
Contributor Author

mdebbar commented Oct 31, 2022

@nbayati The framework is responsible for "drawing" the text field and its contents. But on the web, we still need a real element on the page (to show the virtual keyboard on mobile, and to listen to change events, etc).

We make the element that we inject into the page transparent so that it doesn't affect what flutter draws.

Copy link
Contributor

@nbayati nbayati left a comment

Choose a reason for hiding this comment

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

LGTM!

@mdebbar mdebbar added the autosubmit Merge PR when tree becomes green via auto submit App label Nov 1, 2022
@auto-submit auto-submit bot merged commit 81f5c30 into flutter:main Nov 1, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 2, 2022
schwa423 pushed a commit to schwa423/engine that referenced this pull request Nov 16, 2022
@mdebbar mdebbar deleted the forced_color_adjust branch January 17, 2023 18:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
autosubmit Merge PR when tree becomes green via auto submit App platform-web Code specifically for the web engine
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants