Changeset 23085
- Timestamp:
- 12/06/2012 03:15:39 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/js/media-views.js
r23083 r23085 1850 1850 title: '', 1851 1851 propagate: true, 1852 freeze: document.body1852 freeze: true 1853 1853 }); 1854 1854 }, … … 1887 1887 open: function() { 1888 1888 var $el = this.$el, 1889 options = this.options, 1890 $freeze; 1889 options = this.options; 1891 1890 1892 1891 if ( $el.is(':visible') ) … … 1896 1895 this.attach(); 1897 1896 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. 1897 // If the `freeze` option is set, record the window's scroll position. 1900 1898 if ( options.freeze ) { 1901 $freeze = $( options.freeze );1902 1899 this._freeze = { 1903 overflow: $freeze.css('overflow'),1904 1900 scrollTop: $( window ).scrollTop() 1905 1901 }; 1906 $freeze.css( 'overflow', 'hidden' );1907 1902 } 1908 1903 … … 1920 1915 this.propagate('close'); 1921 1916 1922 // If the `freeze` option is set, restore the container's scroll 1923 // position and overflow property. 1917 // If the `freeze` option is set, restore the container's scroll position. 1924 1918 if ( freeze ) { 1925 $( this.options.freeze ).css( 'overflow', freeze.overflow );1926 1919 $( window ).scrollTop( freeze.scrollTop ); 1927 1920 }
Note: See TracChangeset
for help on using the changeset viewer.