Skip to content

Callback functions are not called, even on demo page; reorder announcement never fires either #44

@v79

Description

@v79

Hi,

In both my own code and on the demo page at https://schne324.github.io/dragon-drop/demo/ none of the callback functions are executed. Given this basic example:

dragonDrop
            .on('grabbed', (container, item) => console.log(`Item ${item.innerText} grabbed`))
            .on('dropped', (container, item) => console.log(`Item ${item.innerText} dropped`))
            .on('reorder', (container, item) => console.log(`Reorder: ${item.innerText} has moved`))
            .on('cancel', () => console.log('Reordering cancelled'));

None of these log events appear in the console. And this is true for me even on the demo page at https://schne324.github.io/dragon-drop/demo/ .

Further, on the demo page the reorder announcement is never displayed, only grabbed and dropped. Browser breakpoints do fire for grabbed and dropped; no breakpoint fires for reorder (in Chrome, Firefox, Edge). If I add localStorage.debug = 'drag-on-drop:*'; I can see console logs for grabbed and dropped, but again, not for reorder.

Normally I'd be happy to admit that my code is wrong, but I can't see it working on the demo page either :(.

Thanks,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions