-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
After prolong usage "selection-changed" stop firing #1654
Comments
root cause: mousedown was triggered,but the museup was not triggered. let mouseCount = 0;
this.emitter.listenDOM('mousedown', document.body, () => {
mouseCount = 1;
});
this.emitter.listenDOM('mouseup', document.body, () => {
mouseCount = 0;
if (mouseCount === 0) {
this.update(Emitter.sources.USER);
}
});
this.emitter.listenDOM('selectionchange', document, () => {
if (mouseCount === 0) {
setTimeout(this.update.bind(this, Emitter.sources.USER), 1);
}
}); The next time the mouse is uped, it can fix the |
Thanks for looking into the cause @HWliao ! |
Is there any idea on the timing for the next version with this commit? |
After some prolog usage, selection-changed" events stop firing.
probably related to #1584
I've manage to track to problem to the following:
A breakpoint on that method revealed that mouseCount has a value > 0 (it was 8) and going up with each click.
the mouse-up event handler, that was suppose to keep mouseCount at 0 does not fired, but I couldn't figure out why:
The text was updated successfully, but these errors were encountered: