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

TapEventPlugin dependencies are calculated at module loading time #1619

Closed
sophiebits opened this issue May 29, 2014 · 2 comments
Closed

TapEventPlugin dependencies are calculated at module loading time #1619

sophiebits opened this issue May 29, 2014 · 2 comments

Comments

@sophiebits
Copy link
Collaborator

TapEventPlugin has:

var dependencies = [
  topLevelTypes.topMouseDown,
  topLevelTypes.topMouseMove,
  topLevelTypes.topMouseUp
];

if (EventPluginUtils.useTouchEvents) {
  dependencies.push(
    topLevelTypes.topTouchCancel,
    topLevelTypes.topTouchEnd,
    topLevelTypes.topTouchStart,
    topLevelTypes.topTouchMove
  );
}

at the top level. Since useTouchEvents won't have been set to true at require time (even if it will be set to true before any user code runs), the touch events are never bound.

Not super high priority because we don't actually support/advertise TapEventPlugin yet, but it would be nice if this worked before merging #1170.

(Thanks @ryanseddon for reporting.)

@ryanseddon
Copy link
Contributor

Nice just stepped through the code myself and saw that.

@sophiebits
Copy link
Collaborator Author

fixedit

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 a pull request may close this issue.

2 participants