You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] Closing a file preview calls a missing Files Sidebar method #3446
Nextcloud Server 35.0.2, official Apache Docker image
Bundled Viewer 8.0.0
Chromium with a 390 × 844 mobile viewport and touch emulation
Reproduced with custom CSS disabled and by accessing Nextcloud directly, without proxy HTML injection or modified JavaScript
Steps to reproduce
Open Files and preview a PNG image.
Close the preview using its close button.
Inspect the browser console.
Actual result
Viewer.close() throws TypeError: OCA.Files.Sidebar.setFullScreenMode is not a function.
Image preview and download work. A PDF can be opened after the close transition finishes, so this report does not claim that subsequent previews are consistently blocked.
Expected result
Closing the preview completes without an exception when this optional Files Sidebar method is unavailable.
A callable guard around the close-time invocation should preserve compatibility with both Sidebar APIs and allow the following fullscreen cleanup to run.
Minimal proposed fix and focused check
Against viewer commit d0d68b960285c820cc69e7eb05d68d9a98555230:
- if (OCA?.Files?.Sidebar) {+ if (typeof OCA?.Files?.Sidebar?.setFullScreenMode === 'function') {
OCA.Files.Sidebar.setFullScreenMode(false)
}
A Node VM check using the actual extracted close() method reproduces the exception on the baseline (and skipped fullscreen exit), then passes with a missing method, missing Files API, and callable legacy method. The legacy method receives false with its original receiver. This is a focused method check, not a full Vue build or integration test.
Activity
susnux commentedon Oct 25, 2026
#3448