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

revert(ripple): handle touch events #7557

Merged
merged 1 commit into from
Oct 6, 2017

Conversation

devversion
Copy link
Member

@devversion devversion commented Oct 5, 2017

Reverts the ripple(): handle touch events commit from PR #7299. With the current touch solution, ripples are showing up twice on click.

This is because after a touchstart event, the touch browser fires a mousedown event. This causes the ripple renderer to fade in another ripple from the mousedown event.

There are solutions like:

  • Timeout to ignore mousedown events
  • Calling preventDefault / stopPropagation on touchstart
  • Listening to pointerdown, pointerup, pointerleave events
  • Using feature detecton (as in Modernizr)

All of those solutions have negative aspects on the UX of the ripples and need to be evaluated with more testing.

For now the ripples are broken and should be fixed as soon as possible. This is going to be revisited.

@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Oct 5, 2017
Copy link
Member

@crisbeto crisbeto left a comment

Choose a reason for hiding this comment

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

Looks like this could end up breaking the ripples.

@crisbeto crisbeto added pr: lgtm action: merge The PR is ready for merge by the caretaker and removed pr: needs review action: merge The PR is ready for merge by the caretaker labels Oct 5, 2017
this._isPointerDown = true;
this.fadeInRipple(event.clientX, event.clientY, this.rippleConfig);
this._isMousedown = true;
this.fadeInRipple(event.pageX, event.pageY, this.rippleConfig);
Copy link
Member

Choose a reason for hiding this comment

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

Sorry, just took another look. This should use clientX and clientY.

Copy link
Member Author

Choose a reason for hiding this comment

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

Good catch

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated it and fixed a lint error. Please have another look.

Reverts the `ripple(): handle touch events` commit from PR#7299. With the current touch solution, ripples are showing up twice on click.

This is because after a `touchstart` event, the touch browser fires a `mousedown` event. This causes the ripple renderer to fade in another ripple from the `mousedown` event.

There are solutions like:

* Timeout to ignore `mousedown` events
* Calling `preventDefault` / `stopPropagation` on `touchstart`
* Listening to `pointerdown`, `pointerup`, `pointerleave` events
* Using feature detecton (as in Modernizr)

All of those solutions have negative aspects on the UX of the ripples and need to be evaluated with more testing.

For now the ripples are broken and should be fixed as soon as possible. This is going to be revisited.
Copy link
Member

@jelbourn jelbourn left a comment

Choose a reason for hiding this comment

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

LGTM

@jelbourn jelbourn added P1 Impacts a large percentage of users; if a workaround exists it is partial or overly painful pr: lgtm action: merge The PR is ready for merge by the caretaker and removed pr: needs review labels Oct 6, 2017
@kara kara merged commit 37a423b into angular:master Oct 6, 2017
@crisbeto crisbeto mentioned this pull request Oct 17, 2017
@devversion devversion deleted the revert/touch-events-ripple branch January 7, 2018 08:52
@angular-automatic-lock-bot
Copy link

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 Sep 8, 2019
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 P1 Impacts a large percentage of users; if a workaround exists it is partial or overly painful
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants