Opened 7 years ago
Closed 7 years ago
#42244 closed defect (bug) (fixed)
Audio widget overflows sidebar container element
Reported by: | alexvorn2 | Owned by: | westonruter |
---|---|---|---|
Milestone: | 4.9 | Priority: | normal |
Severity: | normal | Version: | 4.9 |
Component: | Widgets | Keywords: | needs-patch |
Focuses: | Cc: |
Description
I have it in a sidebar in the Twenty Fifteen, and it looks to looong, maybe other themes have the same problem.
How to replicate:
- Activate Twenty Fifteen theme
- Add Audio widget to the sidebar
- Add a song and view the page.
Attachments (5)
Change History (14)
#1
@
7 years ago
I tested other bundled themes, I can see a problem only on this theme (Twenty Fifteen).
#4
@
7 years ago
@westonruter I'm not sure if that's a back-compat issue, but the JS sizing in MediaElement has always been a bit wonky. Taking a cue from [41838], I think adding max-width: 100%
to the .mejs-container
rules at the top of wp-mediaelement.css
should take care of this.
#5
@
7 years ago
It does seem to be a regression. The audio player looks fine in 4.8.2.
In 4.8.2, I see the .mejs-container
element has width:100%
whereas in trunk
it has width: 412.641px;
and min-width: 227px;
.
Adding a max-width
is not helping here because unlike wp_video_shortcode()
which outputs the video
wrapper elements statically (the div.wp-video
), the wp_audio_shortcode()
wraps the audio
element dynamically in JS. So the max-width
gets added to the audio
element which is not shown anyway.
#6
@
7 years ago
- Milestone changed from Awaiting Review to 4.9
Simply adding a div.wp-audio
to wrap around the audio
element seems to fix the overflow problem (for some reason). See wp-audio-container.png. The player, however, doesn't seem to display optimally in this small size. See audio-widget-in-4.8.2.png for how the Audio widget looks in 4.8.2.
#7
@
7 years ago
- Component changed from Bundled Theme to Widgets
- Keywords needs-patch added
- Summary changed from Audio Widget looks weird to Audio widget overflows sidebar container element
@rafa8626 Is this something you can look into?
#8
@
7 years ago
@westonruter 42244.1.diff is what I was suggesting. I wouldn't recommend adding an extra div to solve this.
You can see how Audio Widget looks into the Twenty Fifteen theme