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

Hotfix/touchmove #115

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

seanpan
Copy link

@seanpan seanpan commented Jun 1, 2017

不好意思直接开了PR方便描述,请看一下

touchstart和touchend都能正常工作,因为不在unbubbleEvents列表中,而touchmove则不然,见:
src/event-system.js:81

直接在element上加ontouchtmove似乎是有问题的(在chrome设备模拟器中即可重现),不过不是太明白当时你写为unbubble的意图,来请教一下。

直接从unbubbleEvents列表中移除后目前case可pass,测试也没问题。后续我考虑补齐一些event-system相关的case。

请告诉我你的想法

@Lucifier129
Copy link
Owner

把 touchmove 添加到 unbubbleEvents 是因为 react 里有个 issue,说不要把 touchmove 绑定到 document 节点,会导致用户在 touchmove 时频繁触发事件函数。

现在问题出现在 onTouchMove 无法生效吗?从代码上看,它只是直接绑定到元素上了。

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