Ticket #22765: 22765.patch
| File 22765.patch, 1.1 KB (added by azaozz, 6 months ago) |
|---|
-
wp-includes/js/media-views.js
1895 1895 if ( ! this.views.attached ) 1896 1896 this.attach(); 1897 1897 1898 // If the `freeze` option is set, record the window's scroll 1899 // position and the body's overflow, and then set overflow to hidden. 1898 // If the `freeze` option is set, record the window's scroll position. 1900 1899 if ( options.freeze ) { 1901 $freeze = $( options.freeze );1902 1900 this._freeze = { 1903 overflow: $freeze.css('overflow'),1904 1901 scrollTop: $( window ).scrollTop() 1905 1902 }; 1906 $freeze.css( 'overflow', 'hidden' );1907 1903 } 1908 1904 1909 1905 $el.show().focus(); … … 1919 1915 this.$el.hide(); 1920 1916 this.propagate('close'); 1921 1917 1922 // If the `freeze` option is set, restore the container's scroll 1923 // position and overflow property. 1918 // If the `freeze` option is set, restore the container's scroll position. 1924 1919 if ( freeze ) { 1925 $( this.options.freeze ).css( 'overflow', freeze.overflow );1926 1920 $( window ).scrollTop( freeze.scrollTop ); 1927 1921 } 1928 1922
