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

Drag & drop is broken #311

Closed
marcwieland95 opened this issue Feb 3, 2019 · 10 comments
Closed

Drag & drop is broken #311

marcwieland95 opened this issue Feb 3, 2019 · 10 comments
Labels

Comments

@marcwieland95
Copy link
Contributor

I just noticed that there's an issue even on the documentation page with the drag & drop.

The element is lost and can't be moved after some mouse interactions. I'm not sure on which exact behaviour this is happening.

Is this issue already known? For me, it looks like it's quite critical and a basic behaviour which sould work. I can dig into the code and debug. But first I wanted to hear if there are already some ideas on the issue.

Browser: Chrome 71.0 (but I tried also on other browsers)
OS: MacOS 10.14.2

ezgif com-video-to-gif

@av01d
Copy link

av01d commented Feb 8, 2019

Confirmed on Firefox 65 for OSX as well. And Chrome 72/OSX has the same problem, as does MS Edge on Windows.

@lifeinchords
Copy link

lifeinchords commented Feb 8, 2019

I think this is what I'm referencing as well in #309

@marcwieland95
Copy link
Contributor Author

Did someone already some research regarding this issue? I'm using version 3 for the first time and I'm not familiar with the source code yet.

@jedrzejchalubek
Copy link
Member

I've made some research about this issue and it looks like it may be caused by incorrect deletion of swiping events on dragging. removeEventListener do not receive the same capture argument as on addEventListener. Ref cb74a3a

Tagged new v3.2.6 release. It would be great if someone could give a test with this version.

@marcwieland95
Copy link
Contributor Author

I can give it a try tomorrow.

@marcwieland95
Copy link
Contributor Author

I updated GlideJS to versioh 3.2.6. But sadly I can't see any changes regarding the drag & drop issue.

glidejs-slide-bug

@omares
Copy link
Contributor

omares commented Mar 12, 2019

Our glide implementation has the same issue and i can reproduce it on the official glidejs documentation page using Firefox 65.0.1 (64-bit) on mac.

@omares
Copy link
Contributor

omares commented Mar 19, 2019

I started to investigate the issue and it looks like this is related to the moveable flag/logic inside swipe.js.

While testing i have seen that the flag is often set to false and thus preventing code #1, #2 from executing. Blatantly commenting out the set to false code seems to fix the issue.

The intention was to fix #258 but according to feedback it did not do so. My suggestion would be to remove the flag and code as it does not fix the issue and also introduces a component wide state which makes the code hard to understand and prone to side effects.

@jedrzejchalubek Would love to hear your opinion on my suggestion, as i gladly can/would apply the required changes.

@omares
Copy link
Contributor

omares commented Mar 20, 2019

I am impatient and already created a PR #330 that includes my proposed change :)

@marcwieland95
Copy link
Contributor Author

Thanks @omares for your pull request and your work fixing the bug by yourself.

I can confirm that the issue is fixed completely.

ezgif com-video-to-gif (1)

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

5 participants