Make WordPress Core

Changeset 23085


Ignore:
Timestamp:
12/06/2012 03:15:39 AM (12 years ago)
Author:
koopersmith
Message:

Do not alter the body's overflow attribute when the media modal is opened. Fix image insertion in the visual editor in Firefox. props azaozz. fixes #22765.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/js/media-views.js

    r23083 r23085  
    18501850                title:     '',
    18511851                propagate: true,
    1852                 freeze:    document.body
     1852                freeze:    true
    18531853            });
    18541854        },
     
    18871887        open: function() {
    18881888            var $el = this.$el,
    1889                 options = this.options,
    1890                 $freeze;
     1889                options = this.options;
    18911890
    18921891            if ( $el.is(':visible') )
     
    18961895                this.attach();
    18971896
    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.
    19001898            if ( options.freeze ) {
    1901                 $freeze = $( options.freeze );
    19021899                this._freeze = {
    1903                     overflow:  $freeze.css('overflow'),
    19041900                    scrollTop: $( window ).scrollTop()
    19051901                };
    1906                 $freeze.css( 'overflow', 'hidden' );
    19071902            }
    19081903
     
    19201915            this.propagate('close');
    19211916
    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.
    19241918            if ( freeze ) {
    1925                 $( this.options.freeze ).css( 'overflow', freeze.overflow );
    19261919                $( window ).scrollTop( freeze.scrollTop );
    19271920            }
Note: See TracChangeset for help on using the changeset viewer.