Skip to content
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

Fix label tap by checking matched label pairs #5039

Merged
merged 4 commits into from
Feb 22, 2018
Merged

Fix label tap by checking matched label pairs #5039

merged 4 commits into from
Feb 22, 2018

Conversation

dfreedm
Copy link
Member

@dfreedm dfreedm commented Jan 12, 2018

Fixes #4717

Copy link
Contributor

@TimvdLippe TimvdLippe left a comment

Choose a reason for hiding this comment

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

SFTM

@TimvdLippe
Copy link
Contributor

@azakus Is this PR mergeable with just the smoke test or would you like some unit tests for this one as well?

Workaround IE11 not having `element.labels` and Safari not populating
`element.labels` in shadowroots
@dfreedm
Copy link
Member Author

dfreedm commented Feb 22, 2018

Added tests

Remove broken `while` loop, as that case is already handled by the
mouseCancellor code
Copy link
Contributor

@sorvell sorvell left a comment

Choose a reason for hiding this comment

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

Just add one test and otherwise seems good.

let labels = el.labels;
// IE doesn't have `labels` and Safari doesn't populate `labels`
// if element is in a shadowroot.
// In this instance, finding the non-ancestor labels is enough,
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's test that case.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

@dfreedm dfreedm merged commit 481dea6 into master Feb 22, 2018
@dfreedm dfreedm deleted the fix-label-tap branch February 22, 2018 01:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants