mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-02 05:41:33 +02:00
Merge pull request #21995 from overleaf/mf-disable-footer-tooltip-if-element-is-not-available
[web] Only trigger footer tooltip if target element is available GitOrigin-RevId: e0aff735243369a0d2180174231951054f1ee533
This commit is contained in:
@@ -14,19 +14,18 @@ function getElementWidth(el: Element) {
|
||||
const footerLanguageElement = document.querySelector(
|
||||
'[data-ol-lang-selector-tooltip]'
|
||||
) as Element
|
||||
if (footerLanguageElement) {
|
||||
// eslint-disable-next-line no-new
|
||||
new Tooltip(footerLanguageElement)
|
||||
}
|
||||
|
||||
const allTooltips = document.querySelectorAll('[data-bs-toggle="tooltip"]')
|
||||
|
||||
const possibleBadgeTooltips = document.querySelectorAll('[data-badge-tooltip]')
|
||||
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const footLangTooltip = new Tooltip(footerLanguageElement)
|
||||
|
||||
allTooltips.forEach(element => {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const tooltip = new Tooltip(element)
|
||||
})
|
||||
|
||||
const possibleBadgeTooltips = document.querySelectorAll('[data-badge-tooltip]')
|
||||
possibleBadgeTooltips.forEach(element => {
|
||||
// Put data-badge-tooltip on .badge-content
|
||||
// then tooltip is only shown if content is clipped due to max-width on .badge
|
||||
|
||||
Reference in New Issue
Block a user