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

After moving a frame using drag and drop, the wrong frame is selected (Firefox) #363

Closed
juliandescottes opened this issue Dec 8, 2015 · 1 comment
Labels

Comments

@juliandescottes
Copy link
Collaborator

Steps to reproduce :

  • open Piskel in Firefox
  • open a piskel with 4 distinct frame
  • using the mouse/drag-and-drop, move the first frame to the another position

Expected : the moved frame should be selected
Actual : the new 'first' frame gets selected.

Some investigation :
We have a moved frame F, going from index i1 to i2.
After the mouseup releasing F, the currentFrame is set to the new index of F, which is i2 At the next call of the render loop, all UIs will redraw accordingly.
However on Firefox a click event is also fired after the mouseup event, which triggers another call to setCurrentFrame. This one is based on the data-attribute of the event target. Since the UI has most likely not had time to redraw yet, F's data-attribute is still i1.

Could be a bug/limitation of jquery's sortable util.

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

1 participant