Prevent scrolling beneath modals on mobile devices by removing overflow from `#wpwrap` when a modal is open.

Fixes #29909
Props avryl

Built from https://develop.svn.wordpress.org/trunk@30707


git-svn-id: http://core.svn.wordpress.org/trunk@30697 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
John Blackbourn 2014-12-02 08:09:25 +00:00
parent a5fa87325b
commit e96e165c3a
7 changed files with 18 additions and 4 deletions

View File

@ -223,6 +223,11 @@ body.modal-open {
overflow: hidden;
}
body.mobile.modal-open #wpwrap {
overflow: hidden;
height: 100%;
}
iframe,
img {
border: 0;

View File

@ -223,6 +223,11 @@ body.modal-open {
overflow: hidden;
}
body.mobile.modal-open #wpwrap {
overflow: hidden;
height: 100%;
}
iframe,
img {
border: 0;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -77,6 +77,8 @@ var wpLink;
open: function( editorId ) {
var ed;
$( document.body ).addClass( 'modal-open' );
wpLink.range = null;
if ( editorId ) {
@ -166,6 +168,8 @@ var wpLink;
},
close: function() {
$( document.body ).removeClass( 'modal-open' );
if ( ! wpLink.isMCE() ) {
wpLink.textarea.focus();

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.1-beta2-30706';
$wp_version = '4.1-beta2-30707';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.