Drab: No javascript event fire, after execution of drab command

I have a page that using drab for shortening urls.

<button class="btn btn-github" drab="click:shorten_url">
<i class="material-icons right">content_cut</i>Shorten
</button>

and I have also javascript for that page to count user’s typing letter.

var textArea = document.getElementById("message");
textArea.addEventListener("keyup", function(){
      console.log("Hello from keyup!");
});

key up event works fine before execute drab command, but after execute drab command(clicking Shorten button), key up event doesn’t fire.
What would it be possible reason?

1 Like

OK.
I found what the problem is.
in defhandler I was doing this
poke socket, shorten_url: bitlink_url, long_url: long_url, bitlink_id: bitly.id

and bitlink_url assigns was placed in the other form. It was updating other form so that it was cleaning up form element. and also keyup event was not working.

2 Likes