I am currently troubleshooting a user interaction issue with my Firefox extension. The tasks that my extension needs to complete include:
- Checking certain structures on the currently viewed browser tab
- Making backend server calls
- Opening dialogs
- Redirecting the user to a landing page
Initially, everything seemed to be working fine. I began the sequence with the following eventHandler:
window.gBrowser.selectedTab.addEventListener("load",function(){ Fabogore.Load();},true);
However, after opening the dialog, I attempted to remove the EventHandler from within the dialog like this:
window.opener.gBrowser.selectedTab.removeEventListener("load",function(){Fabogore.Load();},true);
Despite using selectedTab, the sequence kept getting triggered repeatedly as the event listener was fetching every load event from every single tab. This resulted in the dialog popping up multiple times. I also tried closing the event Handler in the original Javascript.
Any thoughts on what might be causing this issue?