Frontend & browser·JavaScript in the browser
you stopped the click from reaching the document and three unrelated features quietly broke.
stopPropagation
Also calledstop propagation, stopImmediatePropagation
Halting an event's travel through the rest of the tree, so no ancestor listener sees it — while the browser's default action still happens. It is the usual fix for a click inside an overlay closing the overlay, and the usual cause of the next bug, because analytics, focus management and outside-click detection all listen higher up. Prefer checking the target in the outer handler over silencing the event for everyone.