Skip to content

[2.x] fix: remove the save draft button when the composer is minimized on mobile - #138

Merged
imorland merged 1 commit into
2.xfrom
im/mobile-minimized-save-icon
Aug 2, 2026
Merged

[2.x] fix: remove the save draft button when the composer is minimized on mobile#138
imorland merged 1 commit into
2.xfrom
im/mobile-minimized-save-icon

Conversation

@imorland

@imorland imorland commented Aug 2, 2026

Copy link
Copy Markdown
Member

The bug

On mobile, the save-draft icon correctly appears in the header while the composer is open — but stays pinned there after minimizing the composer.

Root cause

The control-item guard already tried to handle this:

(this.state.position === 'minimized' && !this.state.isFullScreen())

But core's ComposerState.isFullScreen() is unconditionally true on phones"or if we are on a mobile device, where we always consider the composer as full-screen". So on mobile the second clause is always false, the guard can never fire, and the button — which carries App-backControl, the class core pins into the app header on phones — survives minimization. Desktop evaluates isFullScreen() as false when minimized, which is why only mobile misbehaved.

The subtlety only bites at the exact transition: while the composer is open, position === 'minimized' short-circuits the whole clause, so isFullScreen()'s phone behaviour never matters until the moment you minimize.

The fix

The guard checks position alone. A composer cannot be minimized and full-screen at the same time, so the !isFullScreen() qualifier only ever served to defeat the check on phones.

Verification

Reproduced on a real mobile-viewport session against a dev install before the fix (minimized composer, item-save-draft still rendered in .Composer-controls, fixed-positioned into the header), and confirmed fixed after — including manual on-device confirmation that the icon leaves the header on minimize and still appears while composing.

…obile

The composer control guard hid the save button when the composer was
minimized — but only alongside !isFullScreen(), and core's
isFullScreen() is unconditionally true on phones ("we always consider
the composer as full-screen"). On mobile the guard could therefore
never fire, and because the button carries App-backControl, it stayed
pinned in the app header after minimizing. Desktop was unaffected,
which is why only mobile misbehaved.

Minimized is minimized: the guard now checks the position alone. A
composer cannot be minimized and full-screen at the same time, so the
extra clause only ever served to defeat the check on phones.
@imorland
imorland requested a review from a team as a code owner August 2, 2026 08:03
@imorland imorland changed the title fix: remove the save draft button when the composer is minimized on mobile [2.x] fix: remove the save draft button when the composer is minimized on mobile Aug 2, 2026
@imorland
imorland merged commit ac7b9fc into 2.x Aug 2, 2026
20 checks passed
@imorland
imorland deleted the im/mobile-minimized-save-icon branch August 2, 2026 08:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant