Skip to content

Test FMultiSelect highlight follows the last tapped item (#1055)#1065

Merged
Pante merged 3 commits into
mainfrom
fix/multi-select-focus
Jun 19, 2026
Merged

Test FMultiSelect highlight follows the last tapped item (#1055)#1065
Pante merged 3 commits into
mainfrom
fix/multi-select-focus

Conversation

@Pante

@Pante Pante commented Jun 19, 2026

Copy link
Copy Markdown
Member

Describe the changes

Follow-up to the #1055 fix, which shipped bundled in #1061 without a regression test or changelog entry. This PR backfills both.

  • Add a regression test (multi_select_test.dart) for Only one(most probably first) selected item in the FMultiSelect widget is highlighted #1055: on touch, a quick tap must move the highlight to the tapped item instead of leaving it on the first (autofocused) item. Verified TDD-style — it fails against the pre-fix logic at the second-tap assertion and passes with the fix.
  • Add the missing CHANGELOG.md entry under the unreleased FSelect & FMultiSelect section documenting the fix.
  • Reword the focus-handling comments in select_item.dart to explain why focus is moved in onPress (the pressed variant is debounced, so the press branch never fires on a quick tap) rather than in onVariantChange.
  • Trim the example sandbox.dart down to FSelect + FMultiSelect for manually exercising this behavior.

Closes #1055.

Checklist

  • I have read the CONTRIBUTING.md.
  • I have included the relevant unit/golden tests.
  • I have included the relevant samples.
  • I have updated the documentation accordingly.
  • I have added the required flutters_hook for widget controllers.
  • I have updated the CHANGELOG.md if necessary.

Pante and others added 2 commits June 19, 2026 15:01
Regression test for #1055: on touch, a quick tap must move the highlight to
the tapped item instead of leaving it on the first (autofocused) item.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 19, 2026 07:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@Pante Pante merged commit c781469 into main Jun 19, 2026
19 of 20 checks passed
@Pante Pante deleted the fix/multi-select-focus branch June 19, 2026 07:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Only one(most probably first) selected item in the FMultiSelect widget is highlighted

2 participants