mirror of
https://github.com/HeyPuter/puter.git
synced 2025-02-03 07:48:46 +08:00
Take into account the menubar height when positioning the contextmenu via puter.js
This commit is contained in:
parent
0dbc6aad0f
commit
476f408a13
@ -373,6 +373,12 @@ window.addEventListener('message', async (event) => {
|
||||
// get window position
|
||||
const window_position = $(el_window).position();
|
||||
|
||||
// does this window have a menubar?
|
||||
const $menubar = $(el_window).find('.window-menubar');
|
||||
if($menubar.length > 0){
|
||||
y += $menubar.height();
|
||||
}
|
||||
|
||||
// update mouse position
|
||||
update_mouse_position(x + window_position.left, y + window_position.top + 25);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user