fl4p / WP-Filebase

WP-Filebase
http://wpfilebase.com/
34 stars 35 forks source link

Bug after uploading file with file browser #10

Closed pguedesbr closed 8 years ago

pguedesbr commented 9 years ago

In the admin, file browser page of wp-filebase, after you upload a file to a folder/category, it will show up in that folder/category, with 2 links (edit / remove).

When you click in remove, it will remove the parent category in which the file has just been uploaded to. When you try to drag/move the file, it will move the whole parent category, ultimately causing an error if you move it to a subcategory of it (cant move category into a subcategory of itself).

None of theses errors happen if you refresh the file browser page after uploading files.

fl4p commented 8 years ago

Couldnt reproduce it. Can you do screen capture (GIF or video)?

pguedesbr commented 8 years ago

Hello

Here is a demo of the error when you drag a file to another folder right after uploading it: https://www.youtube.com/watch?v=GggPsQuPfHk

Basically the error seems to be related to the event listeners, which is the same cause of the other case (clicking remove on a file removes its category/folder)

Hope that helps.

fl4p commented 8 years ago

Thanks, the video made it clear.

Fixed with https://github.com/f4bsch/WP-Filebase/commit/a87aa62d9e068c6d15ffdf36cbb81d069e4dc709