Ticket #22649: 22649-media-views.js-2.patch
File 22649-media-views.js-2.patch, 982 bytes (added by , 12 years ago) |
---|
-
wp-includes/js/media-views.js
1935 1935 if ( ! this.views.attached ) 1936 1936 this.attach(); 1937 1937 1938 // Attempt to work around a nasty long-standing bug with position: fixed in iOS Safari 1939 if ( /Mobile\/.+Safari/.test(window.navigator.userAgent) ) { 1940 $('div.media-modal, div.media-modal-backdrop').css('position', 'absolute'); 1941 // making the modal position: absolute pins it at the top of the window :( 1942 this.scrollTop = window.scrollY; 1943 $(window).scrollTop(0); 1944 } 1945 1938 1946 this.$el.show().focus(); 1939 1947 return this.propagate('open'); 1940 1948 }, … … 1943 1951 if ( ! this.views.attached || ! this.$el.is(':visible') ) 1944 1952 return this; 1945 1953 1954 if ( this.scrollTop ) 1955 $(window).scrollTop( this.scrollTop ); 1956 1946 1957 this.$el.hide(); 1947 1958 this.propagate('close'); 1948 1959