What happens is that each browser is in charge of how it loads a page. Firefox seems to be different in the order of operations that it chooses to load and basically the code is trying to act on a viz but the viz object has not fully loaded. At least in most cases this is what it appears to be. In some cases, since the view is being placed into another webpage, Firefox makes us think that other webpage has something on it.

I hope one of workaround options below help.

Option 1: Try loading the views when the selection to another tab happens, rather than at load.

Option 2: since the view is being placed into another webpage, Firefox makes us think that other webpage has something on it. So you can try to put that code into a page wrapped with <html> </html> and see if that works