[appSwitcher] use event.stopPropagation()

This commit is contained in:
spalger 2015-09-22 18:50:37 -07:00
parent 72a610078f
commit 9214b255df

View file

@ -37,7 +37,12 @@ require('ui/modules')
if (sameProto && sameHost && samePath) {
domLocation.reload();
event.preventDefault();
// event.preventDefault() keeps the browser from seeing the new url as an update
// and even setting window.location does not mimic that behavior, so instead
// we use stopPropagation() to prevent angular from seeing the click and
// starting a digest cycle/attempting to handle it in the router.
event.stopPropagation();
}
};