Skip to content

[TS] Bind remaining web touch handlers#1082

Merged
erictraut merged 3 commits intomicrosoft:masterfrom
dagatsoin:fix/bind-other-web-touch-handlers
Apr 25, 2019
Merged

[TS] Bind remaining web touch handlers#1082
erictraut merged 3 commits intomicrosoft:masterfrom
dagatsoin:fix/bind-other-web-touch-handlers

Conversation

@dagatsoin
Copy link
Copy Markdown
Contributor

@dagatsoin dagatsoin commented Apr 16, 2019

Depends on #1083

Following PR #1079

This PR does the following

  • bind onTouchStart to ViewProps.onResponderStart
  • bind onTouchEnd to ViewProps.onResponderRelease
  • bind onTouchCancel to ViewProps.onResponderTerminate
  • let the onTouchEnd of a long press bubbles up
  • add a test in ButtonTest.tsx

@dagatsoin dagatsoin force-pushed the fix/bind-other-web-touch-handlers branch from 5970056 to 30cd070 Compare April 20, 2019 21:26
@dagatsoin dagatsoin changed the title [DO NOT MERGE] Bind remaining web touch handlers [TS] Bind remaining web touch handlers Apr 20, 2019
@dagatsoin
Copy link
Copy Markdown
Contributor Author

Branch updated @erictraut There is a test in ButtonTest file if needed.

Copy link
Copy Markdown
Contributor

@erictraut erictraut left a comment

Choose a reason for hiding this comment

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

Looks good to me. Just one place where your changes intersected some other changes I made recently. Please update that, and I'll merge. Thanks again for the contribution!

Comment thread src/web/Button.tsx

// Touch has left the button, cancel the longpress handler.
if (this._isMouseOver && this._longPressTimer) {
Timers.clearTimeout(this._longPressTimer);
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.

Looks like a merge conflict occurred here. I recently updated all of the reactxp code to use Timers.clearTimeout consistently.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@erictraut
Copy link
Copy Markdown
Contributor

Thanks again for the contribution! Merged.

@erictraut erictraut merged commit d48afcb into microsoft:master Apr 25, 2019
@dagatsoin dagatsoin deleted the fix/bind-other-web-touch-handlers branch April 26, 2019 09:20
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.

2 participants