Closed Bug 1797263 Opened 3 years ago Closed 3 years ago

alert prevents rendering of page

Categories

(Core :: DOM: Core & HTML, defect)

Firefox 106
defect

Tracking

()

RESOLVED WONTFIX

People

(Reporter: david.balazic, Unassigned)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:106.0) Gecko/20100101 Firefox/106.0

Steps to reproduce:

as described on https://www.reddit.com/r/firefox/comments/yczdap/alert_in_documentready_creates_page_rendering/

(copied description)

I noticed recently on some web pages that an alert will make the "background" (the page) not render correctly.

What happens is that most of the page is loaded/displayed and the alert is shown, but large parts of the page are missing. If I ctrl+tab to another tab and back, the missing content appears. The same happens if I slightly change the window size.

Regression in FF 106 ? I don't remember seeing this in older versions, but can't be sure.

PS: I saved this webpage (just the HTML), added this at the end of the body and the same thing happens:

<script>
document.addEventListener("DOMContentLoaded", function(event) {
alert("tu sem");
});
</script>

The problem happens in 2 tries out of 3.

(example HTML file attached)

I have Firefox version 106.0.1

The problem happens with a fresh profile too.

The Bugbug bot thinks this bug should belong to the 'Core::DOM: Core & HTML' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → DOM: Core & HTML
Product: Firefox → Core

Using ./mach mozregression --bad 2022-10-25 --good 105 command, I can see the behaviour changes since bug 1788125. Thought the behaviour got changed to the alert blocks the rendering of the entire document (not partially as to what is being described in the description), probably the behaviour got changed again later with some further tweaks.

Olli, mind take a look?

Severity: -- → S2
Flags: needinfo?(smaug)
Regressed by: 1788125

That is the expected behavior from bug 1788125. We shouldn't really paint since that means running animation frame callbacks during alert().

Flags: needinfo?(smaug)

And tab switch is causing a forced paint without triggering rAF callbacks. We could possibly do some of that, but it would also regress bug 1788125.

Okay, since this is expected, I am closing this as WONTFIX

Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Resolution: --- → WONTFIX

Additional information: Sometimes the previous web page is displayed instead of the current one

Details:

  • open a web page
  • submit (POST) a form
  • the new page displays an alert
  • the web page shown is the old one, not the new one
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: