diff --git a/centrallix-os/sys/js/htdrv_page.js b/centrallix-os/sys/js/htdrv_page.js index 5f6a8a1e2..2f4005504 100755 --- a/centrallix-os/sys/js/htdrv_page.js +++ b/centrallix-os/sys/js/htdrv_page.js @@ -2752,7 +2752,8 @@ function pg_mousemove(e) pg_tipinfo.x = e.pageX; pg_tipinfo.y = e.pageY; } - if (pg_checkmodal(ly)) return EVENT_HALT | EVENT_PREVENT_DEFAULT_ACTION; + // A window drag must keep tracking the cursor when it moves off the modal. + if (pg_checkmodal(ly) && !window.wn_current) return EVENT_HALT | EVENT_PREVENT_DEFAULT_ACTION; /*if (pg_modallayer) { if (!pg_isinlayer(pg_modallayer, ly)) return EVENT_HALT | EVENT_PREVENT_DEFAULT_ACTION; @@ -2880,7 +2881,8 @@ function pg_mouseup(e) { var ly = e.layer; if (ly.mainlayer) ly = ly.mainlayer; - if (pg_checkmodal(ly)) return EVENT_HALT | EVENT_PREVENT_DEFAULT_ACTION; + // A window drag must be able to terminate when released off the modal. + if (pg_checkmodal(ly) && !window.wn_current) return EVENT_HALT | EVENT_PREVENT_DEFAULT_ACTION; /*if (pg_modallayer) { if (!pg_isinlayer(pg_modallayer, ly)) return EVENT_HALT | EVENT_ALLOW_DEFAULT_ACTION; diff --git a/centrallix-os/sys/js/htdrv_window.js b/centrallix-os/sys/js/htdrv_window.js index 02bfc326c..3df42f803 100644 --- a/centrallix-os/sys/js/htdrv_window.js +++ b/centrallix-os/sys/js/htdrv_window.js @@ -749,8 +749,8 @@ function wn_mousedown(e) { if (e.target.name == 'close') pg_set(e.target,'src','/sys/images/02bigclose.gif'); - else if ((e.mainlayer.has_titlebar && cx__capabilities.Dom0NS && e.pageY < e.mainlayer.pageY + 24) || - (cx__capabilities.Dom1HTML && e.layer.subkind == 'titlebar' )) + else if (e.which == 1 && ((e.mainlayer.has_titlebar && cx__capabilities.Dom0NS && e.pageY < e.mainlayer.pageY + 24) || + (cx__capabilities.Dom1HTML && e.layer.subkind == 'titlebar' ))) { wn_current = e.mainlayer; wn_msx = e.pageX;