Closed grdw closed 8 years ago
I had to make a change to get this to work. onSaveAs.bind(this)
was being called in the window
context, so the callback was being bound to the document
object and not to the button element. This meant that I would enter a name for the new LES, click "Save", and nothing would happen. It just... didn't work.
I added a namespace to the event and called off("click.onSaveAs")
before binding; if the user moved to a different page and then hit their back button, multiple onSaveAs
events would be bound to the same button. I think we should be using event delegation more.
Fixes: #1352