Avoid content language selector dialog resize shortly after opening

Small dialogs were resizing after loading when display and input
setting buttons were added to it. Now delay showing the dialog until
they are loaded.

Bug: T276248
Change-Id: I7033903737afedbd4be908c84d07656c468ce801
This commit is contained in:
Niklas Laxström
2021-03-22 08:25:58 +01:00
committed by Jdlrobson
parent 8c835588f2
commit e8747a022d

View File

@@ -474,13 +474,17 @@
// behavior sepcific to compact language links.
!standalone
);
// Trigger the click handler to open ULS
$target.trigger( 'click' );
// Provide access to display and input settings if this entry point is the single point
// of access to all language settings.
uls = $target.data( 'uls' );
// Trigger the click handler to open ULS once ready
if ( standalone ) {
loadDisplayAndInputSettings( uls );
// Provide access to display and input settings if this entry point is the single point
// of access to all language settings.
uls = $target.data( 'uls' );
loadDisplayAndInputSettings( uls ).always( function () {
$target.trigger( 'click' );
} );
} else {
$target.trigger( 'click' );
}
} );
}