WP4.5 jQuery update and table styles issue
-
This issue is so weird that I don’t really know how to describe it… ??
—
Issue description
I am using Beaver Builder plugin where I’ve noticed this issue. But please, don’t stop reading right now thinking I should post a Beaver Builder plugin support ticket, it’s more complicated…
I also use a custom built theme.
When I want to add or edit a page builder’s row/column background image, the media library won’t display.
This was working perfectly fine in WordPress 4.4.2, though. I’ve been able to trace the issue down to CSS issue, not (directly) a Javascript one!
—
What’s needed to replicate the issue
- jQuery v1.12.0+ – This is included in new WordPress 4.5 by default (there is a version 1.12.3, actually)
- Add these styles (a simple basic table styles that can be applied in any theme as a table style reset) to the end of
style.css
file of Twenty Sixteen theme (any theme can actually have had such styles applied):table { border-style: solid; border-collapse: collapse; }
- Install and activate Beaver Builder plugin (though I guess this could affect other plugins too) and edit a “Sample Page” (or any page) with page builder and try to add a row/column background image (photo)
Result:
If you follow the above steps (with cleared browser cache after you apply additional table styles), media library does not open.—
Fix (workaround)
The issue is resolved once you remove the
border-collapse: collapse;
style or change it toseparate/initial/inherit
value. Or if you remove theborder-style
style (note that this works in any form). The media library will appear then.Other way to fix this is to apply the
border-collapse
more specifically. If your theme is based on Underscores, this should do the trick:table { /* Your table default styles (reset) */ ... border: 1px solid #ccc; /* You are defining a border style here */ ... } .site table { border-collapse: collapse; /* Now the issue is not triggered */ }
—
Conclusion
As you can see, this issue is not really related to any specific theme, nor Beaver Builder plugin (or any other plugin with similar issue) and possibly not even to WordPress itself. Maybe it is just jQuery issue as if I downgrade the version to 1.11.3, everything works fine again.
I would just like to ask anybody for opinion. Should the WordPress JS code be updated or is this a jQuery bug I should report?
Thanks and regards,
Oliver
- The topic ‘WP4.5 jQuery update and table styles issue’ is closed to new replies.