Only apply metabox handle styles and JS events to .postbox .hndle, as opposed to all h3s in a .postbox.

Developers previously relying on the `h3` behavior may be affected. You may want to investigate `do_meta_boxes()` rather than recreating markup.

props SergeyBiryukov, nabil_kadimi.
fixes #28485.


git-svn-id: https://develop.svn.wordpress.org/trunk@28940 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Helen Hou-Sandi
2014-07-01 16:22:32 +00:00
parent 92a7523362
commit c6c89eed8a
3 changed files with 11 additions and 16 deletions

View File

@@ -705,8 +705,8 @@ td.help {
------------------------------------------------------------------------------*/
.widget .widget-top,
.postbox h3,
.stuffbox h3,
.postbox .hndle,
.stuffbox .hndle,
.control-section .accordion-section-title,
h3.dashboard-widget-title,
h3.dashboard-widget-title span,
@@ -729,9 +729,8 @@ h3.dashboard-widget-title small,
color: #222;
}
.postbox h3,
#namediv h3,
#submitdiv h3 {
.postbox .hndle,
.stuffbox .hndle {
border-bottom: 1px solid #eee;
}
@@ -1349,6 +1348,7 @@ html.wp-toolbar {
}
}
.js .widget .widget-top,
.js .postbox .hndle {
cursor: move;
}
@@ -1380,20 +1380,15 @@ html.wp-toolbar {
line-height: 1;
}
.postbox h3,
.stuffbox h3 {
margin-top: 1px;
/* user-select is not a part of the CSS standard - may change behavior in the future */
.postbox .hndle,
.stuffbox .hndle {
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.js .widget .widget-top,
.js .postbox h3 {
cursor: move;
}
.postbox .inside,
.stuffbox .inside {
padding: 0 12px 12px;

View File

@@ -260,7 +260,7 @@ table.fixed td {
border: 1px solid #dfdfdf;
}
#wpbody-content .postbox h3 {
#wpbody-content .postbox .hndle {
margin-bottom: -1px;
}

View File

@@ -9,7 +9,7 @@ var postboxes;
self.init(page, args);
$('.postbox h3, .postbox .handlediv').bind('click.postboxes', function() {
$('.postbox .hndle, .postbox .handlediv').bind('click.postboxes', function() {
var p = $(this).parent('.postbox'), id = p.attr('id');
if ( 'dashboard_browser_nag' == id )
@@ -28,7 +28,7 @@ var postboxes;
}
});
$('.postbox h3 a').click( function(e) {
$('.postbox .hndle a').click( function(e) {
e.stopPropagation();
});