Bug 214429 - Safari 13+macOS 10.14 Regression: Rendering stops after the page is idle for ~45s and does not resume for ~10s after an event
Summary: Safari 13+macOS 10.14 Regression: Rendering stops after the page is idle for ...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: Safari 13
Hardware: Mac macOS 10.14
: P2 Major
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-07-16 15:40 PDT by Jonathan Deutsch
Modified: 2020-07-23 15:41 PDT (History)
6 users (show)

See Also:


Attachments
File that reproduces the problem (101 bytes, text/html)
2020-07-16 15:40 PDT, Jonathan Deutsch
no flags Details
Video showing the bug in action (9.74 MB, video/quicktime)
2020-07-16 15:41 PDT, Jonathan Deutsch
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Deutsch 2020-07-16 15:40:39 PDT
Created attachment 404490 [details]
File that reproduces the problem

If a page is left idle for about 45 seconds, the page will enter some sort of paused mode. After about 10 seconds from an event, the page will resume rendering. This makes it look like the page is unresponsive and stuck.

This is easily demonstrated by simple code like:

```

<div id="box" style="opacity:.3">hello world</div>
<div onclick="box.style.opacity=1">click me</div>

```

Steps to reproduce:

1. Load the above code (attached as rendering-pauses-bug.html)
2. Wait 1 minute
3. Click "click me"

Expected result:
The opacity of "hello world" changes instantly.

Observed result:
It takes about 10 seconds for the opacity to change.

Please see the attached video "rendering-pauses-bug-repro.mov" to see this in action.

Note that it isn't just this one property, the entire page stops rendering. So if there's an animation it won't show up either.  Code is definitely being run in the background.  There are a few ways to force rendering like resizing the window, but I haven't found any JavaScript-based methods that consistently can tickle rendering to turn back on.  This can reproduce with dev tool enabled (but they must not have focus), however the dev tools themselves will not update their view while in this condition.

Reproducibility:
Able to reproduce about 95% of the time. Sometimes it takes a bit more than 45 seconds; usually waiting a minute is enough.

Configuration:
This only occurs on macOS 10.14 with Safari 13.x.  Specifically tested with macOS 10.14.6 and Safari 13.1.2.  I could not reproduce with Safari 12, or on macOS 10.13 or macOS 10.15+Safari 13.1.1.

Impact:
Those lines of code are pretty simple so this is likely to be a widespread bug. It specifically affects content made by Tumult Hype [https://tumult.com/hype/] and was originally reported by a user.
Comment 1 Jonathan Deutsch 2020-07-16 15:41:05 PDT
Created attachment 404491 [details]
Video showing the bug in action
Comment 2 Simon Fraser (smfr) 2020-07-16 16:14:30 PDT
Since this is fixed in macOS 15 it's unlikely that we'll make a change for macOS 14.
Comment 3 Simon Fraser (smfr) 2020-07-16 16:26:04 PDT
^ 10.15, 10.14 of course :)
Comment 4 Jonathan Deutsch 2020-07-16 17:27:06 PDT
10.14 is pretty tenacious, but I did just install the Safari 14 beta for Mojave and could not reproduce it so this may actually be resolved.

As a side note, would there be any javascript workarounds for this to tickle rendering? The Hype runtime could take care of it on behalf of users.
Comment 5 Radar WebKit Bug Importer 2020-07-23 15:41:20 PDT
<rdar://problem/66017562>