Restore the event delegation code to fix an IE8 issue.