Bug 949019: a web page that will keep Firefox captured forever.
bugzilla.mozilla.orgChrome, too - if the "Confirm leave" appears, you can press tab twice, then return. this will close the page.
Or just press Enter right away / use the (x) in the upper right of the dialog and keep closing the tab. It will go away eventually.
Chrome isn’t perfect here, but lightyears ahead of the mess that Firefox makes.