My plugin no longer works since 1.2.18 -- any help?

I put together the GrabScroll plugin which allows horizontal scrolling of wide boards simply by dragging the board itself. Now it stopped working since Kanboard 1.2.18, but it breaks only after dragging a card, and I can’t figure out why. Works fine if you don’t drag any cards.

It seems like the element I’m attaching to (#board-container) is being deleted and so the event handlers disappear? I tried to attach the handlers to #main instead, but the same thing happened.

I then tried to figure out what ways there are for plugin authors to attach listeners using the KB object, but it seems Kanboard triggers no event when #board-container gets replaced. We must use the KB object so listeners get reattached properly, correct?

I would very much appreciate some ideas, I know almost nothing about frontend development and it seems the JavaScript parts aren’t documented in the Kanboard Developers Guide.

Edit: I am now cheating by reattaching the listeners on $(document).ajaxStop(). This works, but this isn’t the clean way to do it in Kanboard, right?