[wp-trac] [WordPress Trac] #38728: Prevent previewer becoming frozen when refreshing too fast
WordPress Trac
noreply at wordpress.org
Thu Nov 10 10:17:03 UTC 2016
#38728: Prevent previewer becoming frozen when refreshing too fast
--------------------------+--------------------
Reporter: nikeo | Owner:
Type: defect (bug) | Status: new
Priority: high | Milestone: 4.7
Component: Customize | Version: trunk
Severity: normal | Resolution:
Keywords: needs-patch | Focuses:
--------------------------+--------------------
Comment (by nikeo):
@westonruter I think I found the reason of the fundamental problem you've
pointed out, and which is actually the real problem to solve.
The previousPreview must be stored once synced, in the `onceSynced`
callback.
I've introduced an `api._previousPreview` object to do the job. There
should be no impact on performances, since this object will store only one
`api.previewFrame` instance at a time, and will be overriden on each
refresh call.
The fix is now much simpler then, because following your warning, I've
removed the `$.deferred()` part that was forcing the refresh to be done in
sequence, causing slow sites to potentially miss their last api changes.
This fixes the problem on my side (still on chrome). Let me know if it
works on your side.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/38728#comment:13>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list