diff --git a/src/UI/UIContextMenu.js b/src/UI/UIContextMenu.js
index 9f5f65d3..367bc33c 100644
--- a/src/UI/UIContextMenu.js
+++ b/src/UI/UIContextMenu.js
@@ -20,7 +20,7 @@
function UIContextMenu(options){
$('.window-active .window-app-iframe').css('pointer-events', 'none');
- const menu_id = global_element_id++;
+ const menu_id = window.global_element_id++;
let h = '';
h += `
(window.innerHeight - taskbar_height - 10))
- y_pos = window.innerHeight - menu_height - taskbar_height - 10;
+ if( (start_y + menu_height) > (window.innerHeight - window.taskbar_height - 10))
+ y_pos = window.innerHeight - menu_height - window.taskbar_height - 10;
else
y_pos = start_y;
@@ -257,7 +257,7 @@ function UIContextMenu(options){
$(options.parent_element).css('overflow', 'scroll');
$(options.parent_element).removeClass('has-open-contextmenu');
if($(options.parent_element).hasClass('taskbar-item')){
- make_taskbar_sortable()
+ window.make_taskbar_sortable()
}
}
})