When a window is being dragged don't activate toolbar (duh!)

This commit is contained in:
jelveh
2025-06-29 19:36:03 -07:00
parent 40260a9fb2
commit 0864be054c
2 changed files with 10 additions and 0 deletions

View File

@@ -1587,6 +1587,10 @@ async function UIDesktop(options) {
// hovering over a hidden toolbar will show it
$(document).on('mouseenter', '.toolbar-hidden', function () {
// if a window is being dragged, don't show the toolbar
if(window.a_window_is_being_dragged)
return;
if(window.is_fullpage_mode)
$('.window-app-iframe').css('pointer-events', 'none');
@@ -1600,6 +1604,10 @@ async function UIDesktop(options) {
// hovering over a visible toolbar will show it and cancel hiding
$(document).on('mouseenter', '.toolbar:not(.toolbar-hidden)', function () {
// if a window is being dragged, don't show the toolbar
if(window.a_window_is_being_dragged)
return;
// Clear any pending hide timeout when entering toolbar
if (toolbarHideTimeout) {
clearTimeout(toolbarHideTimeout);

View File

@@ -1636,6 +1636,7 @@ async function UIWindow(options) {
$(el_window).draggable({
start: function(e, ui){
window.a_window_is_being_dragged = true;
// if window is snapped, unsnap it and reset its position to where it was before snapping
if(options.is_resizable && window_is_snapped){
window_is_snapped = false;
@@ -1798,6 +1799,7 @@ async function UIWindow(options) {
}
},
stop: function () {
window.a_window_is_being_dragged = false;
let window_will_snap = false;
$( el_window ).draggable( "option", "cursorAt", false );