fix JS event handler removal
Merge pull request #282 from ministryofjustice/fix_js_handler_removal

Fix JS event handler removal