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

MouseUp丢失报错 #29

Closed
homfen opened this issue Sep 6, 2016 · 5 comments
Closed

MouseUp丢失报错 #29

homfen opened this issue Sep 6, 2016 · 5 comments

Comments

@homfen
Copy link
Contributor

homfen commented Sep 6, 2016

hi,当拖动选择颜色时,如果拖到Board外会引发MouseUp丢失,导致window上的listener没有remove,组件Unmount之后再移动鼠标,pointMoveTo方法就会报错:
Uncaught Invariant Violation: findDOMNode was called on an unmounted component.

Windows下比较容易复现,Mac下不容易复现

尝试把事件绑在document上,会好很多但还是会有这个问题,现象是拖动时有卡顿,鼠标变成not-allowed

有什么方法可以解决这个问题吗?谢谢

@ajgilzean
Copy link

I see the same Uncaught Invariant Violation being fired off hundreds of times after onClose when I move my mouse around the screen.

@noyobo
Copy link
Contributor

noyobo commented Dec 17, 2016

嗯. 可能绑定在 window 上不是一个好的方式. 我考虑看怎么解决.

@baptwaels
Copy link

baptwaels commented Feb 2, 2017

Hi, I've got the same problem.

EDIT: Youps, It was a live reload problem, sorry :)

@saroff
Copy link

saroff commented Jun 27, 2017

The problem appears when user clicks both mouse buttons at the same time. In this case onBoardMouseDown(e) happens twice, that means event listeners added twice, but these variables gets overwrited bu the second call:

this.dragListener = addEventListener(window, 'mousemove', this.onBoardDrag);
    this.dragUpListener = addEventListener(window, 'mouseup', this.onBoardDragEnd);

so on mouseup some listeners left and firing errors.

noyobo added a commit that referenced this issue Mar 1, 2018
@noyobo noyobo closed this as completed in 693f27a Mar 1, 2018
@noyobo
Copy link
Contributor

noyobo commented Mar 1, 2018

@saroff fixed on v1.2. if the problem still exists, please reopen the issue

@homfen 经过测试没法复现这个情况,如果还是存在问题,可以提供具体的例子或者录像。感谢。

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

No branches or pull requests

5 participants