Load OOUI widgets only when ULS is opened

OOUI widgets are required for the actions menu dialog, but no need
to have them loaded unconditionally.

Bug: T309793
Change-Id: Icc09b88aa70af1316bd67a56b13a411ebc8f7f8a
This commit is contained in:
Santhosh Thottingal
2022-06-06 12:35:48 +05:30
parent a6425604db
commit cfd6d48bc1
2 changed files with 5 additions and 5 deletions

View File

@@ -180,8 +180,10 @@
}
actionItemsRegistry.on( 'register', onActionItemAdded );
uls.$menu.append( $actionsMenuTrigger );
registerTriggerListener();
// Action menu items need OOUI widgets. Load them and register trigger event handler.
mw.loader.using( [ 'oojs-ui-widgets', 'oojs-ui.styles.icons-interactions' ] ).done( function () {
registerTriggerListener();
} );
}
/**