[wp-trac] [WordPress Trac] #27996: Show/Hide Postbox doesn't work if dynamically added
WordPress Trac
noreply at wordpress.org
Wed Apr 23 17:23:23 UTC 2014
#27996: Show/Hide Postbox doesn't work if dynamically added
----------------------------+-----------------------------
Reporter: johnstonphilip | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 3.9
Severity: normal | Keywords:
Focuses: javascript |
----------------------------+-----------------------------
If you have a plugin which adds a metabox to the page at runtime, the
"handlediv" button which shows/hides the contents of that metabox doesn't
work.
To fix it, the code (on line 12 of postbox.js and also in postbox.min.js)
should change from:
{{{
$('.postbox h3, .postbox .handlediv').bind('click.postboxes', function() {
}}}
To:
{{{
$(document).on('click.postboxes', '.postbox h3, .postbox .handlediv',
function() {
}}}
P.S. I have tried to submit a patch in the past but my entire computer had
a meltdown and scattered files from here to Mordor to the Shire because I
have no idea how to do it properly. This after spending a couple weeks
reading up on how to it properly. So, unfortunately, I am not able to
submit a patch due to the incredibly difficult-for-me-to-understand SVN
system. My Apologies.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/27996>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list