Skip to content

fix(list): selection list marked as touched when tabbing in - #19177

Merged
jelbourn merged 1 commit into
angular:masterfrom
crisbeto:19171/selection-list-touched
May 8, 2020
Merged

fix(list): selection list marked as touched when tabbing in#19177
jelbourn merged 1 commit into
angular:masterfrom
crisbeto:19171/selection-list-touched

Conversation

@crisbeto

Copy link
Copy Markdown
Member

In #18445 the selection list was changed so that it moves focus to the first item when the list receives focus. The problem is that the logic that marks it as touched was still using the list's blur event which means that it'll be marked as touched when focus goes from the list to the item. These changes switch to only using the blur event on the item.

Fixes #19171.

In angular#18445 the selection list was changed so that it moves focus to the first item when the list receives focus. The problem is that the logic that marks it as touched was still using the list's `blur` event which means that it'll be marked as touched when focus goes from the list to the item. These changes switch to only using the `blur` event on the item.

Fixes angular#19171.
@crisbeto crisbeto added P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent target: patch This PR is targeted for the next patch release labels Apr 26, 2020
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Apr 26, 2020

@jelbourn jelbourn 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.

LGTM

cc @mmalerba for relevance to MDC-based list

@jelbourn jelbourn added lgtm action: merge The PR is ready for merge by the caretaker labels Apr 28, 2020
@jelbourn
jelbourn merged commit 7fde305 into angular:master May 8, 2020
jelbourn pushed a commit that referenced this pull request May 8, 2020
In #18445 the selection list was changed so that it moves focus to the first item when the list receives focus. The problem is that the logic that marks it as touched was still using the list's `blur` event which means that it'll be marked as touched when focus goes from the list to the item. These changes switch to only using the `blur` event on the item.

Fixes #19171.
@angular-automatic-lock-bot

Copy link
Copy Markdown

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot Bot locked and limited conversation to collaborators Jun 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug([MatSelectionList]): [ng-touched is applied when focus is gained with [formControl]]

4 participants