diff --git a/src/wp-includes/css/media-views.css b/src/wp-includes/css/media-views.css
index 0f57613..9400702 100644
a
|
b
|
|
1 | 1 | /** |
2 | 2 | * Base Styles |
3 | 3 | */ |
| 4 | body.no-scroll { |
| 5 | overflow: hidden; |
| 6 | } |
| 7 | |
4 | 8 | .media-modal * { |
5 | 9 | -webkit-box-sizing: content-box; |
6 | 10 | -moz-box-sizing: content-box; |
diff --git a/src/wp-includes/js/media-views.js b/src/wp-includes/js/media-views.js
index 0f3246e..5c87532 100644
a
|
b
|
|
3206 | 3206 | var $el = this.$el, |
3207 | 3207 | options = this.options; |
3208 | 3208 | |
| 3209 | // Disallow scrolling on the body while the modal is open. |
| 3210 | $('body').addClass( 'no-scroll' ); |
| 3211 | |
3209 | 3212 | if ( $el.is(':visible') ) { |
3210 | 3213 | return this; |
3211 | 3214 | } |
… |
… |
|
3236 | 3239 | return this; |
3237 | 3240 | } |
3238 | 3241 | |
| 3242 | // Disallow scrolling on the body while the modal is open. |
| 3243 | $('body').removeClass( 'no-scroll' ); |
| 3244 | |
3239 | 3245 | // Hide modal and remove restricted media modal tab focus once it's closed |
3240 | 3246 | this.$el.hide().undelegate( 'keydown' ); |
3241 | 3247 | |