Switch locales selector JS error (#8468). Fix #8466, #8462

* Check for hover tool tip instance to avoid throwing errors

* Remove multiple attr because it is un-needed now
pull/8549/head
Steve Stein 2022-05-06 09:10:09 -06:00 zatwierdzone przez Thibaud Colas
rodzic a4b5819ac5
commit 832a1a67ad
1 zmienionych plików z 8 dodań i 6 usunięć

Wyświetl plik

@ -116,7 +116,6 @@ export function initModernDropdown() {
hoverTooltipInstance = tippy(toggle, {
content: hoverTooltip,
placement: 'bottom',
multiple: true,
plugins: [hideTooltipOnEsc],
});
}
@ -127,17 +126,20 @@ export function initModernDropdown() {
interactive: true,
theme: 'dropdown',
placement: 'bottom',
multiple: true,
plugins: [
hideTooltipOnEsc,
hideTooltipOnBreadcrumbExpandAndCollapse,
rotateToggleIcon,
],
onShow(instance, event) {
hoverTooltipInstance.disable();
onShow() {
if (hoverTooltipInstance) {
hoverTooltipInstance.disable();
}
},
onHide(instance, event) {
hoverTooltipInstance.enable();
onHide() {
if (hoverTooltipInstance) {
hoverTooltipInstance.enable();
}
},
});
}