Prevent scrolling beneath modals on mobile devices by removing overflow from #wpwrap
when a modal is open.
Fixes #29909 Props avryl git-svn-id: https://develop.svn.wordpress.org/trunk@30707 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
f6a51e7ff3
commit
a4db31f9a4
@ -223,6 +223,11 @@ body.modal-open {
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
body.mobile.modal-open #wpwrap {
|
||||||
|
overflow: hidden;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
iframe,
|
iframe,
|
||||||
img {
|
img {
|
||||||
border: 0;
|
border: 0;
|
||||||
|
@ -77,6 +77,8 @@ var wpLink;
|
|||||||
open: function( editorId ) {
|
open: function( editorId ) {
|
||||||
var ed;
|
var ed;
|
||||||
|
|
||||||
|
$( document.body ).addClass( 'modal-open' );
|
||||||
|
|
||||||
wpLink.range = null;
|
wpLink.range = null;
|
||||||
|
|
||||||
if ( editorId ) {
|
if ( editorId ) {
|
||||||
@ -166,6 +168,8 @@ var wpLink;
|
|||||||
},
|
},
|
||||||
|
|
||||||
close: function() {
|
close: function() {
|
||||||
|
$( document.body ).removeClass( 'modal-open' );
|
||||||
|
|
||||||
if ( ! wpLink.isMCE() ) {
|
if ( ! wpLink.isMCE() ) {
|
||||||
wpLink.textarea.focus();
|
wpLink.textarea.focus();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user