#40750 closed defect (bug) (fixed)
Widgets: MediaElement.js player for audio widget sporadically fails to initialize
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.8 | Priority: | normal |
Severity: | normal | Version: | 4.8 |
Component: | Widgets | Keywords: | has-patch |
Focuses: | Cc: |
Description
As reported via @melchoyce in https://wordpress.slack.com/archives/C0381N237/p1494608916089518
Sometimes the volume control doesn't initially appear but then appears after resize: https://cloudup.com/cf0-jpXGDCX
The issue seems to be that the player doesn't initialize with the right dimensions when the widget control is slideDown()
ing. Resizing the window then seems to cause the player to snap into the right place.
We should also consider using ME.js for the video widget since we're using it for the audio widget.
Attachments (1)
Change History (6)
This ticket was mentioned in Slack in #core-customize by westonruter. View the logs.
8 years ago
#3
@
8 years ago
Video of widgets expanding at initialize and after already initialized with patch applied: https://wordpress.slack.com/files/westonruter/F5DND25L7/widgets-in-customizer-with-initialize-after-slidedown-patch-applied.mov
40750.0.diff is a fix which replicates the same logic implemented for the Text widget. TinyMCE fails to initialize properly when the widget is not fully expanded, and it seems ME.js has the same problem. So this patch defers rendering the widget until its container is done animating.
Ideally there would be an event we could listen for the completion of the
:animated
state, but unfortunately it seems jQuery does not provide this.