Skip to content

Instantly share code, notes, and snippets.

@makotom
Last active December 3, 2019 12:39
Show Gist options
  • Save makotom/f45e83a9f2bd0512dca8218a3e2a24a4 to your computer and use it in GitHub Desktop.
Save makotom/f45e83a9f2bd0512dca8218a3e2a24a4 to your computer and use it in GitHub Desktop.
Pages will not be loaded in child windows in Firefox Preview build #13031728 and #13371033
<!doctype html>
<html lang="en">
<meta charset="UTF-8">
<title>Manipulating child window</title>
<a href="https://example.com/" target="tc-20191203-2-child">Click this hyperlink to open <code>example.com</code> in a new window</a>
<script>
{
let flipFlop = false;
document.querySelector('a').addEventListener('click', (evt) => {
window.open('', 'tc-20191203-2-child', 'width=600,height=400');
if (!flipFlop) {
evt.preventDefault();
window.setTimeout(() => {
evt.target.click();
});
}
flipFlop = !flipFlop;
});
}
</script>
<!doctype html>
<html lang="en">
<meta charset="UTF-8">
<title>Manipulating child window</title>
<a href="https://example.com/" target="tc-20191203-child">Click this hyperlink to open <code>example.com</code> in a new window</a>
<script>
document.querySelector('a').addEventListener('click', () => {
window.open('', 'tc-20191203-child', 'width=600,height=400');
});
</script>
@makotom
Copy link
Author

makotom commented Dec 3, 2019

I also want to note that, due to this behaviour (which is neither confirmed with old Firefox Mobile nor Chrome), some buttons (e.g. a button to open a debit card statement) in the online banking website of MUFG Bank will not work in build #13031728.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment