Rebind event with ui

Fixes #1408

Thanks to @mindmelting for the commit.

@thejameskyle - I have 'thisified' the test - could you give the once over to make sure it fits with the latest work you are doing?