Disable background page scrolling when modals are open.
props celloexpressions. fixes #29074. Built from https://develop.svn.wordpress.org/trunk@29346 git-svn-id: http://core.svn.wordpress.org/trunk@29124 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
6018cd50b6
commit
fb9084eed3
|
@ -218,6 +218,10 @@ body.iframe {
|
|||
padding-top: 1px;
|
||||
}
|
||||
|
||||
body.modal-open {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
iframe,
|
||||
img {
|
||||
border: 0;
|
||||
|
|
|
@ -218,6 +218,10 @@ body.iframe {
|
|||
padding-top: 1px;
|
||||
}
|
||||
|
||||
body.modal-open {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
iframe,
|
||||
img {
|
||||
border: 0;
|
||||
|
|
|
@ -409,10 +409,6 @@
|
|||
z-index: 10;
|
||||
}
|
||||
|
||||
body.theme-overlay-open {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.theme-overlay .theme-header {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
|
|
|
@ -409,10 +409,6 @@
|
|||
z-index: 10;
|
||||
}
|
||||
|
||||
body.theme-overlay-open {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.theme-overlay .theme-header {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -701,7 +701,7 @@ themes.view.Details = wp.Backbone.View.extend({
|
|||
// Performs the actions to effectively close
|
||||
// the theme details overlay
|
||||
closeOverlay: function() {
|
||||
$( 'body' ).removeClass( 'theme-overlay-open' );
|
||||
$( 'body' ).removeClass( 'modal-open' );
|
||||
this.remove();
|
||||
this.unbind();
|
||||
this.trigger( 'theme:collapse' );
|
||||
|
@ -1000,7 +1000,7 @@ themes.view.Themes = wp.Backbone.View.extend({
|
|||
|
||||
// Sets this.view to 'detail'
|
||||
this.setView( 'detail' );
|
||||
$( 'body' ).addClass( 'theme-overlay-open' );
|
||||
$( 'body' ).addClass( 'modal-open' );
|
||||
|
||||
// Set up the theme details view
|
||||
this.overlay = new themes.view.Details({
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -3228,6 +3228,9 @@
|
|||
};
|
||||
}
|
||||
|
||||
// Disable page scrolling.
|
||||
$( 'body' ).addClass( 'modal-open' );
|
||||
|
||||
$el.show().find( '.media-modal-close' ).focus();
|
||||
return this.propagate('open');
|
||||
},
|
||||
|
@ -3243,6 +3246,9 @@
|
|||
return this;
|
||||
}
|
||||
|
||||
// Enable page scrolling.
|
||||
$( 'body' ).removeClass( 'modal-open' );
|
||||
|
||||
// Hide modal and remove restricted media modal tab focus once it's closed
|
||||
this.$el.hide().undelegate( 'keydown' );
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -46,6 +46,7 @@ function tb_show(caption, url, imageGroup) {//function called when the user clic
|
|||
if(document.getElementById("TB_overlay") === null){
|
||||
jQuery("body").append("<div id='TB_overlay'></div><div id='TB_window'></div>");
|
||||
jQuery("#TB_overlay").click(tb_remove);
|
||||
jQuery( 'body' ).addClass( 'modal-open' );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -264,6 +265,7 @@ function tb_remove() {
|
|||
jQuery("#TB_imageOff").unbind("click");
|
||||
jQuery("#TB_closeWindowButton").unbind("click");
|
||||
jQuery("#TB_window").fadeOut("fast",function(){jQuery('#TB_window,#TB_overlay,#TB_HideSelect').trigger("tb_unload").unbind().remove();});
|
||||
jQuery( 'body' ).removeClass( 'modal-open' );
|
||||
jQuery("#TB_load").remove();
|
||||
if (typeof document.body.style.maxHeight == "undefined") {//if IE 6
|
||||
jQuery("body","html").css({height: "auto", width: "auto"});
|
||||
|
|
Loading…
Reference in New Issue