-
Notifications
You must be signed in to change notification settings - Fork 6.8k
refactor(cdk/a11y): FocusMonitor now uses InputModalityDetector under the hood. #22489
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
mmalerba
merged 8 commits into
angular:input-modality
from
zelliott:input-modality-integration
Apr 26, 2021
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
55ebc77
feat(cdk/a11y): FocusMonitor now uses InputModalityDetector to resolv…
zelliott f469ee9
refactor(cdk/a11y): Few more changes in advance of opening PR.
zelliott bca58ca
refactor(cdk/a11y): Few additional changes
zelliott 5e127c6
refactor(cdk/a11y): Accept goldens and fix test failures
zelliott b96d907
refactor(cdk/a11y): Respond to PR comments.
zelliott 1a8f6d3
refactor(cdk/a11y): Nit type fix
zelliott f7aa0ea
refactor(cdk/a11y): Response to PR feedback
zelliott c33ac0b
refactor(cdk/a11y): Responded to PR feedback.
zelliott File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previously, in cases when we could attribute
touch
immediately, we would have done so, right? With this change, it looks like touch is always delayed by 650ms?Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I understand you correctly, that's almost correct. Previously, in the case where we could attribute touch immediately (i.e. via
focusVia(el, 'touch'
), we'd immediately update the origin and reset it at the start of the next tick. Now, we still immediately update the origin, but we reset it 650ms later, instead of at the start of the next tick. Thus, this change does slightly change the behavior offocusVia
in that regard. It's easy to fix this, if we want, I think it'd be easy to do. Just want to make sure I understand where you're coming from before changing anything.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was just trying to make sure I understood (which I did not). Now I follow, I think this makes sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay. I added a
isFromInteractionEvent
parameter to this method that allows us to distinguish from when it is called fromfocusVia
versus from theInputModalityService
. Please LMK if you have a better way of distinguishing between the two.