Use document.documentElement instead of 'html' as jQuery selector

Change-Id: I1b3bb53a31125333d14d1659fdadd2a81140ae50
This commit is contained in:
Fomafix
2020-01-07 17:41:07 +01:00
committed by jenkins-bot
parent 0a605f40ab
commit 80b8d411aa
2 changed files with 3 additions and 3 deletions

View File

@@ -162,7 +162,7 @@
ulsPopupPosition = 'after'; ulsPopupPosition = 'after';
} }
// Reverse for RTL // Reverse for RTL
if ( $( 'html' ).prop( 'dir' ) === 'rtl' ) { if ( $( document.documentElement ).prop( 'dir' ) === 'rtl' ) {
ulsPopupPosition = ( ulsPopupPosition === 'after' ) ? 'before' : 'after'; ulsPopupPosition = ( ulsPopupPosition === 'after' ) ? 'before' : 'after';
} }
} else { } else {

View File

@@ -81,7 +81,7 @@
this.$window.find( 'button.uls-settings-apply' ) this.$window.find( 'button.uls-settings-apply' )
.on( 'click', mw.hook( 'mw.uls.settings.apply' ).fire.bind( this ) ); .on( 'click', mw.hook( 'mw.uls.settings.apply' ).fire.bind( this ) );
// Hide the window when clicked outside // Hide the window when clicked outside
$( 'html' ).on( 'click', this.hide.bind( this ) ); $( document.documentElement ).on( 'click', this.hide.bind( this ) );
// ... but when clicked on window do not hide. // ... but when clicked on window do not hide.
this.$window.on( 'click', function ( event ) { this.$window.on( 'click', function ( event ) {
@@ -190,7 +190,7 @@
this.initialized = true; this.initialized = true;
} }
// Close other modal windows which listen to click events outside them // Close other modal windows which listen to click events outside them
$( 'html' ).trigger( 'click' ); $( document.documentElement ).trigger( 'click' );
this.i18n(); this.i18n();
// Every time we show this window, make sure the current // Every time we show this window, make sure the current
// settings panels is up-to-date. So just click on active menu item. // settings panels is up-to-date. So just click on active menu item.