-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
File drop area keeps vanishing #202
Comments
I have the same problem but mine blinks on and off and the file drop only works when the cursor moves and I release the button. When the cursor is stationary and I release the button more often than not the upload does not happen. Linux, Firefox |
Couldn't reproduce at all, might have been fixed though by simply changing around stuff for other things. Please reopen if it still occurs for you. |
I'm seeing this issue, too, on multiple computers. All are Ubuntu Linux using Chrome. I'll work on it. |
@eyal0 hmm, ok, reopening it then. I still haven't been able to reproduce it all, but if you are able to somewhat reliably reproduce it, maybe we can get this narrowed down together! |
Okay, I'm able to reproduce it and I understand the issue. The problem is in files.js. There is a timer that causes the file upload overlay to disappear after 100ms. Ideally, the One solution is to modify the above line from 100 to 400. 400 is safely above 350ms. I tested this on my computer and it works. However, 400ms is slow and the webpage becomes a little clunky. A better solution is to use dragenter and dragleave. It's tricky because a dragleave event occurs when the overlay appears to so you can't just hook dragleave. You need to make sure that it's dragleave of the most recent dragenter. I'll write a PR for that. In the meanwhile, try changing 100 to 400 and see how you like. If it's good enough for you, okay. If it's too slow then the dragleave solution is more complicated but much nicer. |
When I drag a gcode file over the window, initially the dark grey file drop area shows up, but it then vanishes until I wiggle the mouse some more. Happens with both firefox and chrome, on ubuntu 12.04. Octoprint commit
407c61c
The text was updated successfully, but these errors were encountered: