mirror of
https://github.com/mediacms-io/mediacms.git
synced 2025-11-05 23:18:53 -05:00
Hide settings tooltip when menu is open
Removes the tooltip from the settings button when the settings menu is open and restores it when the menu is closed. This improves user experience by preventing the tooltip from overlapping the open menu.
This commit is contained in:
parent
1a080adddc
commit
b2729d16aa
@ -990,8 +990,12 @@ class CustomSettingsMenu extends Component {
|
|||||||
if (btnEl) {
|
if (btnEl) {
|
||||||
if (!isVisible) {
|
if (!isVisible) {
|
||||||
btnEl.classList.add('settings-clicked');
|
btnEl.classList.add('settings-clicked');
|
||||||
|
// Hide tooltip when menu is open
|
||||||
|
btnEl.removeAttribute('title');
|
||||||
} else {
|
} else {
|
||||||
btnEl.classList.remove('settings-clicked');
|
btnEl.classList.remove('settings-clicked');
|
||||||
|
// Restore tooltip when menu is closed
|
||||||
|
btnEl.setAttribute('title', 'Settings');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1011,10 +1015,12 @@ class CustomSettingsMenu extends Component {
|
|||||||
this.refreshSubtitlesSubmenu();
|
this.refreshSubtitlesSubmenu();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Mark settings button as active
|
// Mark settings button as active and hide tooltip
|
||||||
const btnEl = this.settingsButton?.el();
|
const btnEl = this.settingsButton?.el();
|
||||||
if (btnEl) {
|
if (btnEl) {
|
||||||
btnEl.classList.add('settings-clicked');
|
btnEl.classList.add('settings-clicked');
|
||||||
|
// Hide tooltip when menu is open
|
||||||
|
btnEl.removeAttribute('title');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1032,10 +1038,12 @@ class CustomSettingsMenu extends Component {
|
|||||||
if (this.qualitySubmenu) this.qualitySubmenu.style.display = 'none';
|
if (this.qualitySubmenu) this.qualitySubmenu.style.display = 'none';
|
||||||
if (this.subtitlesSubmenu) this.subtitlesSubmenu.style.display = 'none';
|
if (this.subtitlesSubmenu) this.subtitlesSubmenu.style.display = 'none';
|
||||||
|
|
||||||
// Remove active state from settings button
|
// Remove active state from settings button and restore tooltip
|
||||||
const btnEl = this.settingsButton?.el();
|
const btnEl = this.settingsButton?.el();
|
||||||
if (btnEl) {
|
if (btnEl) {
|
||||||
btnEl.classList.remove('settings-clicked');
|
btnEl.classList.remove('settings-clicked');
|
||||||
|
// Restore tooltip when menu is closed
|
||||||
|
btnEl.setAttribute('title', 'Settings');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Restore body scroll on mobile when closing
|
// Restore body scroll on mobile when closing
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user