Merge "Add comment to dropdownMenus.js regarding the CHECKBOX_HACK_BUTTON_SELECTOR"

This commit is contained in:
jenkins-bot 2021-11-03 17:47:00 +00:00 committed by Gerrit Code Review
commit 2d501e987c
1 changed files with 4 additions and 0 deletions

View File

@ -4,6 +4,10 @@ var
checkboxHack = /** @type {CheckboxHack} */ require( /** @type {string} */( 'mediawiki.page.ready' ) ).checkboxHack,
CHECKBOX_HACK_CONTAINER_SELECTOR = '.vector-menu-dropdown',
CHECKBOX_HACK_CHECKBOX_SELECTOR = '.vector-menu-checkbox',
// In core's checkboxHack.js, it is recommended to use a label element as a
// button that toggles the checkbox. In Vector's dropdown menus that use the
// Menu.mustache template, a checkbox is used as both the "button" and the
// "checkbox".
CHECKBOX_HACK_BUTTON_SELECTOR = '.vector-menu-checkbox',
CHECKBOX_HACK_TARGET_SELECTOR = '.vector-menu-content';