From e8747a022dadeeb912f3055524e09d33c6e402ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20Laxstr=C3=B6m?= Date: Mon, 22 Mar 2021 08:25:58 +0100 Subject: [PATCH] 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 --- resources/js/ext.uls.interface.js | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/resources/js/ext.uls.interface.js b/resources/js/ext.uls.interface.js index cc46f484..ac8ec0a6 100644 --- a/resources/js/ext.uls.interface.js +++ b/resources/js/ext.uls.interface.js @@ -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' ); } } ); }