From be7859edb37635dbbc033b2f7c4df76d39cf7f69 Mon Sep 17 00:00:00 2001 From: meetqy Date: Fri, 22 Mar 2024 23:03:19 +0800 Subject: [PATCH] fix: Icons under taskbar #114 --- src/UI/UIItem.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/UI/UIItem.js b/src/UI/UIItem.js index 00b10e77..cef4bddc 100644 --- a/src/UI/UIItem.js +++ b/src/UI/UIItem.js @@ -355,6 +355,14 @@ function UIItem(options){ desktop_item_positions[$(el_item).attr('data-uid')] = ui.position; save_desktop_item_positions() } + + // If item is dropped on the taskbar, reset its position + if(ui.position.top >= window.desktop_height - window.taskbar_height) { + el_item.style.position = 'absolute'; + el_item.style.left = ui.originalPosition.left + 'px'; + el_item.style.top = ui.originalPosition.top + 'px'; + } + $('.item-selected-clone').remove(); $('.draggable-count-badge').remove(); // re-enable all droppable UIItems that are not a dir