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

Sometimes doesn't work in Chrome #18

Closed
NateBrady23 opened this issue Jun 21, 2016 · 23 comments
Closed

Sometimes doesn't work in Chrome #18

NateBrady23 opened this issue Jun 21, 2016 · 23 comments

Comments

@NateBrady23
Copy link

When first loaded in a new Chrome window, dragging works fine, then for some reason it just stops working in every tab on that window. If I open a new window it works again. Both my code and the examples stop working with no indication to a problem in the console.

@clauderic
Copy link
Owner

Are you intermittently using the Chrome touch event simulator by any chance? I'm issuing a fix for a similar issue and wondering if this is related.

@NateBrady23
Copy link
Author

I am not. I'm going through some extensions but can't find a correlation.

@dmiller9911
Copy link

I am seeing this as well, and looks to be due to this:

https://bugs.chromium.org/p/chromium/issues/detail?id=161464

I tracked the events, and I am getting a mousemove event right after mouse down which is causing it to clear the timeout since I have a pressDelay set.

@clauderic
Copy link
Owner

clauderic commented Jun 22, 2016

Hmm, I see. From the looks of it this is a Windows only issue? I suppose I could check if e.type == 'mousemove' || e.type = 'touchmove' (or something along those lines) before clearing the pressDelay timeout

@clauderic
Copy link
Owner

Ah derp but that still wouldn't help... Hmm. @nbrady-techempower are you using pressDelay as well?

@NateBrady23
Copy link
Author

@clauderic No I'm not using pressDelay or any other props. Pretty much exactly as the README example.

@happycamper
Copy link

@clauderic First, great stuff! But I can also confirm that after your last push early today that I no longer have a working README example or the code that i built yesterday. Seeing same issues as @nbrady-techempower

@clauderic
Copy link
Owner

Hey @happycamper, @nbrady-techempower I'm unable to replicate this issue. Can you guys share some details on what OS you're using, version of chrome, whether you're on a laptop that has a touchscreen, and anything you can think of that could help find what's causing this? Might be easier to chat about this on Gitter https://gitter.im/clauderic/react-sortable-hoc

@NateBrady23
Copy link
Author

@clauderic I'm updated to 0.0.3 and can no longer replicate the issue. Thanks for your efforts with this project! I hope to be using it in production soon. I'll mark this as closed for now.

@dsvgit
Copy link

dsvgit commented Nov 30, 2016

I can replicate it. I think it isn't resolved

@clauderic
Copy link
Owner

@dsvgit would you mind providing more details?

@arackaf
Copy link

arackaf commented Nov 30, 2016

Replicated - chrome only. Windows 10 version 54.0.2840.99. The messed up part is, rebooting Chrome (or opening a fresh window) fixes it.

I'm thinking this is a Chrome bug? Maybe?

Does anyone have any idea what the problem could be?

AND - I'll add, I also go to the main demo page

http://clauderic.github.io/react-sortable-hoc/#/basic-configuration/basic-usage?_k=dx177m

and the demos are dead there, too (so it's not a problem with me having an old version)

@clauderic clauderic reopened this Nov 30, 2016
@arackaf
Copy link

arackaf commented Nov 30, 2016

And, annoyingly, it looks like this reliably reproduces when I open Chrome normally, with my other 5 auto tabs open, then browse to your demo page.

But a new single stand-alone window in Chrome has everything working fine.

This is just bizarre.

@dsvgit
Copy link

dsvgit commented Dec 5, 2016

@clauderic I try to figure out why it doesn't work and I found one thing - When it doesn't work I put breakpoint, for example, in function handleStart and then it works. If remove it doesn't.

@dsvgit
Copy link

dsvgit commented Dec 5, 2016

Something wrong with timeout in handleStart function - it doesn't work.
If I do these changes it works:

if (!distance) {
	return _this.handlePress(e);
	//_this.pressTimer = setTimeout(function () {
	//	return _this.handlePress(e);
	//}, _this.props.pressDelay);
}

@clauderic
Copy link
Owner

Hey @dsvgit, just merged #71 to that effect

@dsvgit
Copy link

dsvgit commented Dec 5, 2016

@clauderic are you going to update npm package?

@dsvgit
Copy link

dsvgit commented Dec 6, 2016

Now it works when pressDelay={0} and doesn't when it great than 0

@dsvgit
Copy link

dsvgit commented Dec 6, 2016

Problem is that
handleMove do that on click:

_this.manager.active = null;

before that in handlePress:

var active = _this.manager.getActive();

I think we have to insure that handlePress calls before handleMove

@arackaf
Copy link

arackaf commented Feb 13, 2017

@clauderic this was fixed long ago, wasn't it? Any reason the case is still open?

Someone just sent me this, mentioning that it was still open, and asking if that bug was closed. -- just fyi.

@jamespero
Copy link

FYI I'm seeing this today when I have pressDelay set. Opening a new window and it works in the new window.

@alvinxiao
Copy link

alvinxiao commented Mar 4, 2017

Chiming in to add that I see the problem whether I have pressDelay set or not. Opening a new window fixes the issue but only temporarily until it happens again

Additional information: Chrome only and seems to work if you use the touch emulator within the Dev Tools

@clauderic
Copy link
Owner

Hey @jamespero, @alvinxiao,

What you experienced was actually a misdiagnosed issue. I believe it was actually due to the fact that the pressDelay prop was not fault tolerant, meaning if you moved the mouse even by one pixel, it would cancel the press event.

I can see how that could easily be a problem on trackpads or with a sensitive mouse, and have added a pressThreshold prop to make it more fault tolerant. The default value is set to 5 pixels. See #159 for more details.

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

No branches or pull requests

8 participants