SharePoint Online/2019 javascript/spfx click/popstate not working
Are you working with SharePoint 2019? Maybe making some SPFx Extensions? popstate not working? click not working? MutationObserver not working? well, take a look at this As you can see, Microsoft are intercepting every click in the page, while stopping any bubbling. Therefor, any window/document/body onclick event will not work, in case you are trying to globally catch it. Same for popstate or MutationObserver. *Note - on SPO it seems that popstate event works. Solution - make an interval to keep watching href change: let xPrevLocation = location . href let xOnLocationChangeFunctions = [] setInterval (() => { if ( location . href != xPrevLocation ){ console . log ( "interval location change" , xPrevLocation , location . href ) xPrevLocation = loca...