johnny / johnny/jquery-sortable

Are handlers re-entrant?

Open
#123 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
HTML
Stars
1.5k
Forks
429
PR merge metrics
No merged PRs in 30d

Description

I'm using Meteor and Spacebars (a variant on Handlebars), a dynamic templating system which redraws elements on the page when they change. It seems like the first time I call the code to set a drop target, when the page has been rendered and the dom is stable, everything works. However on the next pass, when it re-renders the page, it calls the setup code again.

This seems to remove the previous handlers for the drop targets, and they become non-responsive. They no longer target, show any indication of being a drop target or respond to drops.

Dragging still works.

I tried removing the sortable from found elements before I add it again on re-render, but it changes nothing.

Ideas?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.