make sure event delegation occur when needed (bug 1007638)