Editor scrolling: set max-width: 100% for the text editor clone instead of always resizing it. See #29246.
Built from https://develop.svn.wordpress.org/trunk@29524 git-svn-id: http://core.svn.wordpress.org/trunk@29300 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
bae4afab44
commit
68a3e1af2c
|
@ -385,6 +385,7 @@ td.plugin-title p {
|
|||
top: 0;
|
||||
visibility: hidden;
|
||||
overflow: hidden;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.wp-fullscreen-wrap #content-textarea-clone {
|
||||
|
|
|
@ -385,6 +385,7 @@ td.plugin-title p {
|
|||
top: 0;
|
||||
visibility: hidden;
|
||||
overflow: hidden;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.wp-fullscreen-wrap #content-textarea-clone {
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -91,7 +91,7 @@ jQuery( document ).ready( function($) {
|
|||
var textEditorHeight = $textEditor.height(),
|
||||
hiddenHeight;
|
||||
|
||||
$textEditorClone.width( $textEditor.width() );
|
||||
$textEditorClone.width( $textEditor.width() - 22 );
|
||||
$textEditorClone.text( $textEditor.val() + ' ' );
|
||||
|
||||
hiddenHeight = $textEditorClone.height();
|
||||
|
@ -461,11 +461,11 @@ jQuery( document ).ready( function($) {
|
|||
$textEditor.css( {
|
||||
marginTop: $textTop.outerHeight()
|
||||
} );
|
||||
}
|
||||
// ALways resize the clone so it doesn't "push" the parent width over 100%
|
||||
|
||||
$textEditorClone.width( contentWrapWidth - 20 - ( borderWidth * 2 ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function fullscreenHide() {
|
||||
textEditorResize();
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -49,11 +49,11 @@ var postboxes;
|
|||
if ( $(this).prop('checked') ) {
|
||||
$postbox.show();
|
||||
if ( $.isFunction( postboxes.pbshow ) )
|
||||
self.pbshow( box );
|
||||
self.pbshow( boxId );
|
||||
} else {
|
||||
$postbox.hide();
|
||||
if ( $.isFunction( postboxes.pbhide ) )
|
||||
self.pbhide( box );
|
||||
self.pbhide( boxId );
|
||||
}
|
||||
self.save_state(page);
|
||||
self._mark_area();
|
||||
|
|
|
@ -1 +1 @@
|
|||
var postboxes;!function(a){var b=a(document);postboxes={add_postbox_toggles:function(c,d){var e=this;e.init(c,d),a(".postbox .hndle, .postbox .handlediv").bind("click.postboxes",function(){var d=a(this).parent(".postbox"),f=d.attr("id");"dashboard_browser_nag"!=f&&(d.toggleClass("closed"),"press-this"!=c&&e.save_state(c),f&&(!d.hasClass("closed")&&a.isFunction(postboxes.pbshow)?e.pbshow(f):d.hasClass("closed")&&a.isFunction(postboxes.pbhide)&&e.pbhide(f)),b.trigger("postbox-toggled",d))}),a(".postbox .hndle a").click(function(a){a.stopPropagation()}),a(".postbox a.dismiss").bind("click.postboxes",function(){var b=a(this).parents(".postbox").attr("id")+"-hide";return a("#"+b).prop("checked",!1).triggerHandler("click"),!1}),a(".hide-postbox-tog").bind("click.postboxes",function(){var d=a(this).val(),f=a("#"+d);a(this).prop("checked")?(f.show(),a.isFunction(postboxes.pbshow)&&e.pbshow(box)):(f.hide(),a.isFunction(postboxes.pbhide)&&e.pbhide(box)),e.save_state(c),e._mark_area(),b.trigger("postbox-toggled",f)}),a('.columns-prefs input[type="radio"]').bind("click.postboxes",function(){var b=parseInt(a(this).val(),10);b&&(e._pb_edit(b),e.save_order(c))})},init:function(b,c){var d=a(document.body).hasClass("mobile");a.extend(this,c||{}),a("#wpbody-content").css("overflow","hidden"),a(".meta-box-sortables").sortable({placeholder:"sortable-placeholder",connectWith:".meta-box-sortables",items:".postbox",handle:".hndle",cursor:"move",delay:d?200:0,distance:2,tolerance:"pointer",forcePlaceholderSize:!0,helper:"clone",opacity:.65,stop:function(){return a(this).find("#dashboard_browser_nag").is(":visible")&&"dashboard_browser_nag"!=this.firstChild.id?void a(this).sortable("cancel"):void postboxes.save_order(b)},receive:function(b,c){"dashboard_browser_nag"==c.item[0].id&&a(c.sender).sortable("cancel"),postboxes._mark_area()}}),d&&(a(document.body).bind("orientationchange.postboxes",function(){postboxes._pb_change()}),this._pb_change()),this._mark_area()},save_state:function(b){var c=a(".postbox").filter(".closed").map(function(){return this.id}).get().join(","),d=a(".postbox").filter(":hidden").map(function(){return this.id}).get().join(",");a.post(ajaxurl,{action:"closed-postboxes",closed:c,hidden:d,closedpostboxesnonce:jQuery("#closedpostboxesnonce").val(),page:b})},save_order:function(b){var c,d=a(".columns-prefs input:checked").val()||0;c={action:"meta-box-order",_ajax_nonce:a("#meta-box-order-nonce").val(),page_columns:d,page:b},a(".meta-box-sortables").each(function(){c["order["+this.id.split("-")[0]+"]"]=a(this).sortable("toArray").join(",")}),a.post(ajaxurl,c)},_mark_area:function(){var b=a("div.postbox:visible").length,c=a("#post-body #side-sortables");a("#dashboard-widgets .meta-box-sortables:visible").each(function(){var c=a(this);1==b||c.children(".postbox:visible").length?c.removeClass("empty-container"):c.addClass("empty-container")}),c.length&&(c.children(".postbox:visible").length?c.removeClass("empty-container"):"280px"==a("#postbox-container-1").css("width")&&c.addClass("empty-container"))},_pb_edit:function(b){var c=a(".metabox-holder").get(0);c&&(c.className=c.className.replace(/columns-\d+/,"columns-"+b)),a(document).trigger("postboxes-columnchange")},_pb_change:function(){var b=a('label.columns-prefs-1 input[type="radio"]');switch(window.orientation){case 90:case-90:b.length&&b.is(":checked")||this._pb_edit(2);break;case 0:case 180:a("#poststuff").length?this._pb_edit(1):b.length&&b.is(":checked")||this._pb_edit(2)}},pbshow:!1,pbhide:!1}}(jQuery);
|
||||
var postboxes;!function(a){var b=a(document);postboxes={add_postbox_toggles:function(c,d){var e=this;e.init(c,d),a(".postbox .hndle, .postbox .handlediv").bind("click.postboxes",function(){var d=a(this).parent(".postbox"),f=d.attr("id");"dashboard_browser_nag"!=f&&(d.toggleClass("closed"),"press-this"!=c&&e.save_state(c),f&&(!d.hasClass("closed")&&a.isFunction(postboxes.pbshow)?e.pbshow(f):d.hasClass("closed")&&a.isFunction(postboxes.pbhide)&&e.pbhide(f)),b.trigger("postbox-toggled",d))}),a(".postbox .hndle a").click(function(a){a.stopPropagation()}),a(".postbox a.dismiss").bind("click.postboxes",function(){var b=a(this).parents(".postbox").attr("id")+"-hide";return a("#"+b).prop("checked",!1).triggerHandler("click"),!1}),a(".hide-postbox-tog").bind("click.postboxes",function(){var d=a(this).val(),f=a("#"+d);a(this).prop("checked")?(f.show(),a.isFunction(postboxes.pbshow)&&e.pbshow(d)):(f.hide(),a.isFunction(postboxes.pbhide)&&e.pbhide(d)),e.save_state(c),e._mark_area(),b.trigger("postbox-toggled",f)}),a('.columns-prefs input[type="radio"]').bind("click.postboxes",function(){var b=parseInt(a(this).val(),10);b&&(e._pb_edit(b),e.save_order(c))})},init:function(b,c){var d=a(document.body).hasClass("mobile");a.extend(this,c||{}),a("#wpbody-content").css("overflow","hidden"),a(".meta-box-sortables").sortable({placeholder:"sortable-placeholder",connectWith:".meta-box-sortables",items:".postbox",handle:".hndle",cursor:"move",delay:d?200:0,distance:2,tolerance:"pointer",forcePlaceholderSize:!0,helper:"clone",opacity:.65,stop:function(){return a(this).find("#dashboard_browser_nag").is(":visible")&&"dashboard_browser_nag"!=this.firstChild.id?void a(this).sortable("cancel"):void postboxes.save_order(b)},receive:function(b,c){"dashboard_browser_nag"==c.item[0].id&&a(c.sender).sortable("cancel"),postboxes._mark_area()}}),d&&(a(document.body).bind("orientationchange.postboxes",function(){postboxes._pb_change()}),this._pb_change()),this._mark_area()},save_state:function(b){var c=a(".postbox").filter(".closed").map(function(){return this.id}).get().join(","),d=a(".postbox").filter(":hidden").map(function(){return this.id}).get().join(",");a.post(ajaxurl,{action:"closed-postboxes",closed:c,hidden:d,closedpostboxesnonce:jQuery("#closedpostboxesnonce").val(),page:b})},save_order:function(b){var c,d=a(".columns-prefs input:checked").val()||0;c={action:"meta-box-order",_ajax_nonce:a("#meta-box-order-nonce").val(),page_columns:d,page:b},a(".meta-box-sortables").each(function(){c["order["+this.id.split("-")[0]+"]"]=a(this).sortable("toArray").join(",")}),a.post(ajaxurl,c)},_mark_area:function(){var b=a("div.postbox:visible").length,c=a("#post-body #side-sortables");a("#dashboard-widgets .meta-box-sortables:visible").each(function(){var c=a(this);1==b||c.children(".postbox:visible").length?c.removeClass("empty-container"):c.addClass("empty-container")}),c.length&&(c.children(".postbox:visible").length?c.removeClass("empty-container"):"280px"==a("#postbox-container-1").css("width")&&c.addClass("empty-container"))},_pb_edit:function(b){var c=a(".metabox-holder").get(0);c&&(c.className=c.className.replace(/columns-\d+/,"columns-"+b)),a(document).trigger("postboxes-columnchange")},_pb_change:function(){var b=a('label.columns-prefs-1 input[type="radio"]');switch(window.orientation){case 90:case-90:b.length&&b.is(":checked")||this._pb_edit(2);break;case 0:case 180:a("#poststuff").length?this._pb_edit(1):b.length&&b.is(":checked")||this._pb_edit(2)}},pbshow:!1,pbhide:!1}}(jQuery);
|
Loading…
Reference in New Issue