nextcloud / nextcloud/server

Bug/Usability: Browser history affected by using URL to control modal

Open
#54,735 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0. Needs triage enhancement
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

Bug/Usability: Browser history affected by using URL to control modal

It seems that the state of the file details modal is controlled via a URL parameter (opendetails=true).
Example:

  • File list: /apps/files/files/403980?dir=/Talk
  • File details modal: /apps/files/files/403980?dir=/Talk&opendetails=true

This causes each modal open/close action to be recorded in the browser history.
When the user tries to go back to the previous folder, they first need to "rewind" through multiple modal openings, which compromises usability.

The same behavior happens when opening a file. After closing it, if we try to go back to the folder, the browser reopens the file instead, since the history was affected.

Steps to reproduce

  1. Open a directory.
  2. Open the details of a file several times (modal).
  3. Try to use the browser’s back button.

The browser goes through all modal open/close states before returning to the previous folder.

Personally, I would prefer that opening/closing a modal is treated as a UI interaction, not as actual navigation.
The back button should take the user directly to the previous folder.

I also notice the absence of a more defined routing system for directories/files.

If there is already any discussion about this, I would like to follow it.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue in the file list using the example URLs and the listed back-button steps. Trace how opening and closing the file details modal changes the URL and browser history, then confirm that navigation returns directly to the previous folder without replaying modal states.

Written by the indexing model from the issue text.

Assessment

Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.