question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Events not firing

See original GitHub issue

Am I doing something wrong? The events listed in the RubAxA/Sortable documentation do not seem to work.

<template>
<ul class="list-group" v-sortable="options">
    <li class="list-group-item">Foo <i class="handle"></i></li>
    <li class="list-group-item disabled">Bar <i class="handle"></i></li>
    <li class="list-group-item">Baz <i class="handle"></i></li>
</ul>
</template>

<script>
export default {
    data() {
        return {
            options: {
                handle: '.handle',
                filter: '.disabled',
                onStart: function (event) {
                    console.log('onStart fired'); // Never happens
                }
            }
        }
    }
}
</script>

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
sagalbotcommented, Jun 27, 2016

Oh man, can’t believe I didn’t spot that! No problem, glad it’s sorted.

1reaction
eberkundcommented, Jun 27, 2016

Thanks so much for the help, after looking at your snippet I found that this part was different

<tbody v-sortable>

Should be

<tbody v-sortable="options">
Read more comments on GitHub >

github_iconTop Results From Across the Web

Event listeners not working? 3 key areas to troubleshoot
Are your event listeners not working as you'd expect? Here are 3 key areas to troubleshoot to help you get everything triggering as...
Read more >
jQuery event not firing - javascript - Stack Overflow
If you happen to use .remove() to extract something temporarily from the DOM and then reinsert it, then you will lose your events....
Read more >
Events not firing (or being handled) - Laracasts
I noticed you said "handler" when referring to what normally is called a "listener." A listener must be registered to an event before...
Read more >
Events not firing - Scripting Support - DevForum | Roblox
Now I'm not 100% that CharacterAdded doesn't fire in local scripts but I don't think thats the problem since CharacterAppearanceLoaded fires.
Read more >
Events are not firing as they should | Automic Workload ...
Few event objects are not firing as they should – the below is set to every 5 minutes but it's running every hour....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found