Last active
December 3, 2019 12:39
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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> |
I confirmed the same phenomena with Nightly 191203 10:27 (Build #13371033)
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
These test cases are inteded to demonstrate that, in Firefox Preview build #13031728, the specified page in a hyperlink won't be loaded in its target window if the target window is artificially opened along with the navigation event.
For instance, try the following steps with
tc-20191203.html
(or with https://makotom.net/tc-20191203.html instead):Expected result is:
https://example.com/ is shown in a new window (tab).
Actual result with the current Firefox Preview is:
A blank page is shown.
I also found out that, if there are another "ticks" between
window.open
and actual navigation, this issue will not appear.See
tc-20191203-2.html
and see what are different from the main test casetc-20191203.html
by comparing codes and their behaviour with the repro steps described above.