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

What is SyntheticEvent in react? #89

Open
2 tasks
zhouzhongyuan opened this issue Sep 20, 2017 · 3 comments
Open
2 tasks

What is SyntheticEvent in react? #89

zhouzhongyuan opened this issue Sep 20, 2017 · 3 comments
Labels

Comments

@zhouzhongyuan
Copy link
Owner

zhouzhongyuan commented Sep 20, 2017

To Read

重要

  • EventPluginHub.js文件中putListener函数,onSelect和onClick注册了两个事件回调插件, 用于walkAround某些浏览器兼容bug,不用care

https://www.youtube.com/watch?v=dRo_egw7tBc
https://github.com/facebook/react/pull/7616/files

@zhouzhongyuan
Copy link
Owner Author

.

@zhouzhongyuan
Copy link
Owner Author

zhouzhongyuan commented Sep 21, 2017

Browsers fire mouse events after touch events.

What does it mean?

TouchEvent -> MouseEvent

It means:

It's important to note that in many cases, both touch and mouse events get sent (in order to let non-touch-specific code still interact with the user). If you use touch events, you should call preventDefault() to keep the mouse event from being sent as well.

form TouchEvent - Web APIs | MDN

Touch event types(All)

touchstart

touchend

touchmove

touchcancel

Mouse event types(Common using)

click

dblclick

mouseup

mousedown

@zhouzhongyuan
Copy link
Owner Author

zhouzhongyuan commented Sep 25, 2017

How does click event listener callback be added?

Intro

  • fbjs: A collection of utility libraries used by other Facebook JS projects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant