Iframe srcdoc fails to load on page refresh given onload script setting its hash
Categories
(Core :: DOM: Navigation, defect, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox-esr115 | --- | wontfix |
| firefox-esr140 | --- | wontfix |
| firefox147 | --- | wontfix |
| firefox148 | --- | wontfix |
| firefox149 | --- | fix-optional |
People
(Reporter: alyssa, Unassigned)
References
(Regression)
Details
(Keywords: nightly-community, regression)
Attachments
(1 file)
|
644 bytes,
text/html
|
Details |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:147.0) Gecko/20100101 Firefox/147.0
Steps to reproduce:
- Open an HTML file, from local hard drive, with the following source code:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Iframe Refresh Demo</title>
</head>
<body>
<iframe id="frame" srcdoc="<!DOCTYPE html><html><head></head><body><p id="1">First paragraph.</p><p id="2">Second paragraph.</p></body></html>"></iframe>
<!-- iframe srcdoc: <!DOCTYPE html><html><head></head><body><p id="1">First paragraph.</p><p id="2">Second paragraph.</p></body></html> -->
<script>
"use strict";
function pass_window_hash_to_iframe() {
let section_iframe = document.getElementById("frame");
section_iframe.contentWindow.location.hash = window.location.hash;
}
window.onload = pass_window_hash_to_iframe;
</script>
</body>
</html>
- refresh the page a few times, including a mix of ordinary refresh and shift-refresh.
I did the above in Firefox 147.0.1, on Windows 11.
Actual results:
On all reloads with shift-refresh, and some-although-not-all reloads with non-shift refresh, the iframe contents failed to display, with Firefox instead displaying an error-page with this message: "Hmm. That address doesn’t look right. Please check that the URL is correct and try again."
Expected results:
The reloads should have consistently loaded the iframe contents into display.
...whoops. Apparently the Bugzilla text-input-interface eats the encoding of the srcdoc element. As a clarification, then: the srcdoc attribute value, in the example code, should be run through appropriate encoding so that everything is well-formed.
Comment 2•9 months ago
|
||
Regression window:
https://hg-edge.mozilla.org/integration/autoland/pushloghtml?fromchange=0a864923a1b47b2959a4ea949f14a8e7cb396cd1&tochange=8a5a636429ea000a738efd1d9189c2a5b696de8d
Updated•9 months ago
|
Comment 3•9 months ago
|
||
Updated•9 months ago
|
Updated•9 months ago
|
Description
•