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 Sep 12, 2024

In certain situations, semantics elements get assigned pointer-events: none when they aren't supposed to.

One such situation is when a text field has a decoration error text. The semantics node become a container, and we always set pointer-events: none on container nodes.

This PR introduces an acceptsPointerEvents getter on SemanticRole and SemanticBehavior to control when pointer-events should be all or none.

Fixes flutter/flutter#141975

@mdebbar mdebbar requested a review from yjbanov September 12, 2024 17:50
@github-actions github-actions bot added the platform-web Code specifically for the web engine label Sep 12, 2024
// This is so that the platform views are not obscured by semantic elements
// and can be reached by inspecting the web page.
if (!hasChildren && !isPlatformView) {
if (semanticRole!.acceptsPointerEvents) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm wondering if we should also check _rect.isEmpty. Although, I can't imagine the framework merging a tappable node such that the merged result is empty. So maybe I'm overthinking this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're worried that we may set pointer-events: all on an empty rect? I don't know if this case ever happens or not, but even if it does, I don't see a problem with accepting pointer events on an empty rect that's not going to obscure anything 🙂

Copy link
Contributor

Choose a reason for hiding this comment

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

Fair point!

@mdebbar mdebbar marked this pull request as ready for review September 17, 2024 18:06
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

@mdebbar mdebbar added the autosubmit Merge PR when tree becomes green via auto submit App label Sep 24, 2024
@auto-submit auto-submit bot merged commit 35af5fe into flutter:main Sep 24, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Sep 24, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Sep 24, 2024
…155610)

flutter/engine@8a54cc5...2745b87

2024-09-24 6844906+zijiehe-google-com@users.noreply.github.com [Fuchsia] Remove deprecated and unnecessary parameters from fuchsia*archive (flutter/engine#55324)
2024-09-24 mdebbar@google.com [web] Fix keyboard not showing up when iOS input has decoration text (flutter/engine#55152)

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 bdero@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
thejitenpatel pushed a commit to thejitenpatel/flutter that referenced this pull request Sep 26, 2024
…lutter#155610)

flutter/engine@8a54cc5...2745b87

2024-09-24 6844906+zijiehe-google-com@users.noreply.github.com [Fuchsia] Remove deprecated and unnecessary parameters from fuchsia*archive (flutter/engine#55324)
2024-09-24 mdebbar@google.com [web] Fix keyboard not showing up when iOS input has decoration text (flutter/engine#55152)

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 bdero@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
thejitenpatel pushed a commit to thejitenpatel/flutter that referenced this pull request Sep 26, 2024
…lutter#155610)

flutter/engine@8a54cc5...2745b87

2024-09-24 6844906+zijiehe-google-com@users.noreply.github.com [Fuchsia] Remove deprecated and unnecessary parameters from fuchsia*archive (flutter/engine#55324)
2024-09-24 mdebbar@google.com [web] Fix keyboard not showing up when iOS input has decoration text (flutter/engine#55152)

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 bdero@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
thejitenpatel pushed a commit to thejitenpatel/flutter that referenced this pull request Sep 27, 2024
…lutter#155610)

flutter/engine@8a54cc5...2745b87

2024-09-24 6844906+zijiehe-google-com@users.noreply.github.com [Fuchsia] Remove deprecated and unnecessary parameters from fuchsia*archive (flutter/engine#55324)
2024-09-24 mdebbar@google.com [web] Fix keyboard not showing up when iOS input has decoration text (flutter/engine#55152)

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 bdero@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
thejitenpatel pushed a commit to thejitenpatel/flutter that referenced this pull request Sep 27, 2024
…lutter#155610)

flutter/engine@8a54cc5...2745b87

2024-09-24 6844906+zijiehe-google-com@users.noreply.github.com [Fuchsia] Remove deprecated and unnecessary parameters from fuchsia*archive (flutter/engine#55324)
2024-09-24 mdebbar@google.com [web] Fix keyboard not showing up when iOS input has decoration text (flutter/engine#55152)

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 bdero@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
@mdebbar mdebbar deleted the ios_input_decoration_fix branch October 1, 2024 17:20
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.

[Web] - Broken TextField in Semantics mode when given an InputDecorator with errorText on mobile browsers

2 participants