Do not activate toolbar when desktop selectable is active

This commit is contained in:
jelveh
2025-07-02 16:14:18 -07:00
parent 7285a27be4
commit 62e786faa6
2 changed files with 11 additions and 2 deletions
+8 -1
View File
@@ -1102,6 +1102,8 @@ async function UIDesktop(options) {
}
})
.on('move', ({ store: { changed: { added, removed } }, event }) => {
window.desktop_selectable_is_active = true;
for (const el of added) {
// if ctrl or meta key is pressed and the item is already selected, then unselect it
if ((event.ctrlKey || event.metaKey) && $(el).hasClass('item-selected')) {
@@ -1122,6 +1124,7 @@ async function UIDesktop(options) {
}
})
.on('stop', evt => {
window.desktop_selectable_is_active = false;
});
}
// ----------------------------------------------------
@@ -1524,7 +1527,7 @@ async function UIDesktop(options) {
$('.toolbar').animate({
top: 0,
}, 100).css('width', 'fit-content');
}, 100).css('width', 'max-content');
// animate show toolbar-btn, toolbar-clock
$('.toolbar-btn, #clock, .user-options-menu-btn').animate({
@@ -1628,6 +1631,10 @@ async function UIDesktop(options) {
if(window.a_window_is_being_dragged)
return;
// if selectable is active , don't show the toolbar
if(window.desktop_selectable_is_active)
return;
if(window.is_fullpage_mode)
$('.window-app-iframe').css('pointer-events', 'none');