Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Browser back misbehaves when code editor is open. #1650

Closed
fjpanag opened this issue Nov 12, 2023 · 2 comments
Closed

Browser back misbehaves when code editor is open. #1650

fjpanag opened this issue Nov 12, 2023 · 2 comments
Labels
⚡ Type: Bug Something isn't working

Comments

@fjpanag
Copy link

fjpanag commented Nov 12, 2023

Mainsail Version:

v2.8.0

Browser:

Firefox

Device:

Desktop PC

Operating System:

Linux

What happened?

I navigate to the machine tab and I open a .conf file with the text editor.

When I click the back button of the browser, the editor remains open but Mainsail navigates to the previous tab in the background.

From the user perspective, nothing happens, but when you eventually close the editor you find yourself in an unrelated tab, other than the machine one.

This seems as a non-issue (just don't click back...), but in fact my mouse has 5 buttons, including back/forward, and out of habit I constantly click back and mess things up...

What did you expect to happen instead?

When the editor is open, clicking back should close the editor.
Either with discarding the changes, or by asking whether they should be saved.

Then, after the editor is closed, the next press of the back button should behave as usual.

(Alternatively, the back button may do nothing when the editor is open, but I would prefer the above solution.)

How to reproduce this bug?

  1. Go to machine tab.
  2. Open a file with the editor.
  3. Press the back button of your browser or mouse.

The editor is still open.
If you close it, you are no longer in the machine tab.

Additional information:

No response

@fjpanag fjpanag added the ⚡ Type: Bug Something isn't working label Nov 12, 2023
@meteyou
Copy link
Member

meteyou commented Nov 12, 2023

This is quite normal, because the editor is no "new site" in the history. its only an overlay.

@meteyou meteyou closed this as not planned Won't fix, can't repro, duplicate, stale Nov 12, 2023
@fjpanag
Copy link
Author

fjpanag commented Nov 12, 2023

This is quite normal, because the editor is no "new site" in the history. its only an overlay.

I understand that, but usually you have the option to click outside an overlay to close it.

Since the editor is full-screen, from the user perspective it is just a new page.
It is an overlay only technically.

So although the current implementation is "technically" correct, as UX it is suboptimal...
Maybe at least disable back when an overlay is displayed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚡ Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants