Skip to content

fix(android): dismiss overlays on system back instead of navigating away - #1249

Merged
7w1 merged 2 commits into
SableClient:devfrom
eleboucher:fix/android-back-dismiss-overlays
Jul 23, 2026
Merged

fix(android): dismiss overlays on system back instead of navigating away#1249
7w1 merged 2 commits into
SableClient:devfrom
eleboucher:fix/android-back-dismiss-overlays

Conversation

@eleboucher

@eleboucher eleboucher commented Jul 23, 2026

Copy link
Copy Markdown
Member

Description

Add useDismissOnBack(requestClose, enabled) hook to androidBack utils and wire it into full-screen and interaction-blocking overlays. On Android the system back action (edge-swipe and 3-button nav) was passing through these overlays and navigating the underlying route, leaving the overlay open.

Wired overlays:

  • Modal500: Room Settings, Space Settings, Settings shallow route
  • MobileSwipeDownModal: message context menu, header menu, nav sidebar menu
  • ImageViewer (refactored from inline handler)
  • GlobalModalManager: Delete, Report, Source, Reactions, EditHistory, ReadReceipts (gated, excludes Forward and MobileOptions)
  • MessageForward: forward picker
  • IncomingCallModal (gated by open state)
  • DeviceVerification
  • Emoji boards in RoomInput, Reactions, MessageEditor (gated, the latter via a MobileEmojiOverlay wrapper since its state comes from a UseStateProvider render-prop)
  • FileContent text and PDF viewers (gated)

Fixes #

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

AI disclosure:

  • Partially AI assisted (clarify which code was AI assisted and briefly explain what it does).
  • Fully AI generated (explain what all the generated code does in moderate detail).

@eleboucher
eleboucher requested review from 7w1 and hazre as code owners July 23, 2026 15:19
Add useDismissOnBack(requestClose, enabled) hook to androidBack utils and
wire it into full-screen and interaction-blocking overlays. On Android the
system back action (edge-swipe and 3-button nav) was passing through these
overlays and navigating the underlying route, leaving the overlay open.

Wired overlays:
- Modal500: Room Settings, Space Settings, Settings shallow route
- MobileSwipeDownModal: message context menu, header menu, nav sidebar menu
- ImageViewer (refactored from inline handler)
- GlobalModalManager: Delete, Report, Source, Reactions, EditHistory,
  ReadReceipts (gated, excludes Forward and MobileOptions)
- MessageForward: forward picker
- IncomingCallModal (gated by open state)
- DeviceVerification
- Emoji boards in RoomInput, Reactions, MessageEditor (gated, the latter via
  a MobileEmojiOverlay wrapper since its state comes from a UseStateProvider
  render-prop)
- FileContent text and PDF viewers (gated)
@eleboucher
eleboucher force-pushed the fix/android-back-dismiss-overlays branch from 4f0071a to 47dbbbd Compare July 23, 2026 16:17
@7w1
7w1 added this pull request to the merge queue Jul 23, 2026
Merged via the queue into SableClient:dev with commit e3ff86d Jul 23, 2026
12 checks passed
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.

2 participants