Fix frustratingly untestable event-bubbling issue