[wp-trac] [WordPress Trac] #38728: Prevent previewer becoming frozen when refreshing too fast
WordPress Trac
noreply at wordpress.org
Wed Nov 9 07:50:15 UTC 2016
#38728: Prevent previewer becoming frozen when refreshing too fast
--------------------------+-----------------------------
Reporter: nikeo | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Customize | Version: trunk
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
When the preview is refreshed too fast, it can happen that it becomes
frozen.
This bug is easy to reproduce with the Twenty Seven theme.
1) In the customizer, navigate to menus
2) Create a menu
3) Enter the menu section and try to click several times in a row on a
location => At some point, the previewer won't be refreshed anymore and
seem to be frozen. ( css class `wp-customizer-unloading` added to the
preview `<body>` )
The menu setting is not the root cause of the issue, it's just an example
of setting using the "refresh" transport type.
When changing too fast the value of a setting with "refresh" transport
property, at some point, the previewer get stuck. It's really becoming a
problem with text type settings for which transport is not set to
`postMessage` or not using the partial refresh.
My understanding of this problem is that a new api.PreviewFrame is
instantiated before the previous one has received the 'synced' event.
The proposed fix introduces a `api._previewer_loading` $.Deferred() which
state is checked before firing a new refresh() call.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/38728>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list