mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-06-16 09:45:24 -04:00
Email reader: 'open in new tab' windows don't auto-dock left on Reply
Replying from an email opened in a new tab was dragging that window to the left-sidebar dock — same treatment as the main email library, even though the user had explicitly opted to pop it into its own floating viewer. Annoying when the viewer is mid-screen and Reply yanks it. Add an early bail in _snapEmailModalToLeftSidebar for modals whose id starts with 'email-view-' (the 'open in new tab' reader). Compose still opens; the floating viewer just stays where it is, on top of the library. User can move/close it themselves.
This commit is contained in:
@@ -1539,6 +1539,12 @@ function _makeDraggable(content, modal, fsClass) {
|
||||
function _snapEmailModalToLeftSidebar(modal) {
|
||||
if (!modal) return false;
|
||||
if (window.innerWidth < 900) return false;
|
||||
// "Open in new tab" reader modals (id="email-view-…") are explicitly
|
||||
// floating windows the user already positioned. Replying from one
|
||||
// shouldn't yank it to the left edge — leave it on top in its current
|
||||
// spot. Reply still opens the compose document; the user can drag the
|
||||
// reader away or close it themselves.
|
||||
if ((modal.id || '').startsWith('email-view-')) return false;
|
||||
const content = modal.querySelector('.modal-content');
|
||||
if (!content) return false;
|
||||
// Only dock if currently fullscreen — for a manually-sized window the
|
||||
|
||||
Reference in New Issue
Block a user