Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Adjustments to FocusHighlightMode handling#162417

Merged
auto-submit[bot] merged 5 commits intoflutter:masterfrom
goderbauer:mouseFocus
Feb 6, 2025
Merged

Adjustments to FocusHighlightMode handling#162417
auto-submit[bot] merged 5 commits intoflutter:masterfrom
goderbauer:mouseFocus

Conversation

@goderbauer
Copy link
Member

@goderbauergoderbauer commentedJan 29, 2025
edited
Loading

Fixes#158527

Adjustments:

  • Using the mouse/trackpad does no longer changeFocusHighlightModes (this matches observed behavior on Android)
  • Changing focus via a11y on the web forcesFocusHighlightModes.touch, which hides the visual input focus indication from non-Textfields. The reason here is in order to give something input focus on the web it also has to have a11y focus, which is indicated separately.

@github-actionsgithub-actionsbot added frameworkflutter/packages/flutter repository. See also f: labels. a: accessibilityAccessibility, e.g. VoiceOver or TalkBack. (aka a11y) f: focusFocus traversal, gaining or losing focus labelsJan 29, 2025
@github-actionsgithub-actionsbot added the f: material designflutter/packages/flutter/material repository. labelJan 30, 2025
@goderbauer
Copy link
MemberAuthor

This is currently blocked on#162472, which is causing the g3 failures.

@goderbauer
Copy link
MemberAuthor

Giving this another go now that#162472 is resolved. 🤞

@goderbauer
Copy link
MemberAuthor

Arg, we have to wait for#162554 to roll into google3 to know that it fixes the issues there. I can confirm that in mylocal testing the issue appears to be fixed.

Onto writing some more tests for this...

@goderbauergoderbauer marked this pull request as ready for reviewFebruary 4, 2025 19:19
Copy link
Contributor

@gspencergooggspencergoog left a comment

Choose a reason for hiding this comment

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

32384589-a60f0e74-c078-11e7-9bc1-e5b5287aea9d

@yjbanovyjbanov changed the titleAdjustments to FocusHighlightMode handelingAdjustments to FocusHighlightMode handlingFeb 4, 2025
arguments is ByteData
? action.copyWith(arguments: const StandardMessageCodec().decodeMessage(arguments))
: action;
final List<ValueSetter<ui.SemanticsActionEvent>> localListeners = _semanticsActionListeners
Copy link
Contributor

Choose a reason for hiding this comment

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

It's not immediately obvious what this is trying to do. AFAICT, this is creating a defensive copy to make sure the iterated list is not mutated during the loop. Maybe leave a comment, or give the variable a better name e.g.defensiveCopy or something?

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

I'll leave a comment. This is a pattern that we use everywhere in the framework where listeners need to be called, though.

if (kIsWeb &&
semanticsActionEvent.type == SemanticsAction.focus &&
_lastInteractionWasTouch != true) {
_lastInteractionWasTouch = true;
Copy link
Contributor

@yjbanovyjbanovFeb 4, 2025
edited
Loading

Choose a reason for hiding this comment

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

It is counter-intuitive that code that handlesSemanticsAction.focus sets something called_lastInteractionWasTouch to true here. Perhaps it's time we renamed_lastInteractionWasTouch to something that reflects the intent, e.g._lastInteractionRequiresNoHighlight (or if we want to remove double-negatives_lastInteractionRequiresHighlight).

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Renaming this is a good idea.

@goderbauer
Copy link
MemberAuthor

Waiting on cl/723567941 to land. That should hopefully resolve the "google testing" issues.

Copy link
Contributor

@yjbanovyjbanov left a comment

Choose a reason for hiding this comment

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

Temporarily removing LGTM because my change, which this PR depends on, might have broken first-frame behavior. I'm looking into that right now.

Copy link
Contributor

@yjbanovyjbanov left a comment

Choose a reason for hiding this comment

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

Re-LGTM. The first frame fix was fairly trivial:#162779

@goderbauer
Copy link
MemberAuthor

goderbauer commentedFeb 6, 2025
edited
Loading

Kicking off another Google testing run... 🤞

@goderbauergoderbauer added the autosubmitMerge PR when tree becomes green via auto submit App labelFeb 6, 2025
@auto-submit
Copy link
Contributor

autosubmit label was removed for flutter/flutter/162417, because - The status or check suiteGoogle testing has failed. Please fix the issues identified (or deflake) before re-applying this label.

@auto-submitauto-submitbot removed the autosubmitMerge PR when tree becomes green via auto submit App labelFeb 6, 2025
@goderbauergoderbauer added the autosubmitMerge PR when tree becomes green via auto submit App labelFeb 6, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull requestFeb 7, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull requestFeb 8, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull requestFeb 8, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull requestFeb 9, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull requestFeb 9, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull requestFeb 10, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull requestFeb 10, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull requestFeb 10, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull requestFeb 10, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull requestFeb 10, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull requestFeb 11, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull requestFeb 11, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull requestFeb 11, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull requestFeb 11, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull requestFeb 11, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull requestMay 20, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull requestMay 20, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull requestMay 21, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@yjbanovyjbanovyjbanov approved these changes

@gspencergooggspencergooggspencergoog approved these changes

Assignees

No one assigned

Labels

a: accessibilityAccessibility, e.g. VoiceOver or TalkBack. (aka a11y)f: focusFocus traversal, gaining or losing focusf: material designflutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.

Projects

Status: No status

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

With EnsureSemantics on, Buttons Maintain Focus State on Press

3 participants

@goderbauer@yjbanov@gspencergoog

Comments


[8]ページ先頭

©2009-2026 Movatter.jp