Webpage closes when inspect element or developer tools is triggered

I am trying to find the source of a video being played in a web page.

In Chromium, whenever I press Ctrl + Shitft + I, the web page closes automatically.
In Firefox, instead of the webpage closing, the tab goes one or two pages backwards.

How do I avoid this?