Skip to content

multiple reload dialogs block eachother #6862

@jek7

Description

@jek7

Description of the bug

Problem: Topmost of multiple "reload" dialog does not always have focus.

If multiple files are modified outside of sublimetext3 there will be one ~"Reload yes no?" dialog for each file. These dialogs are drawn on top of each other and can not be moved, and only one of them have focus and can be clicked or receive keystrokes. The problem is that it is not always the top dialog that has focus, meaning it is not possible to click the buttons in the visible dialog because it do not have focus, and it is not possible to click the focused dialog because it is hidden below the other dialog.
When reproducing I did not have a problem with two files the times I tried, but every time I tried when I tried three files. In reality I think it is more random.

There are no key (AFAIK) that choose "reload" (arrows can be used but when the dialog is not visible it is not very useful) so the only way out is to hit Escape until the dialogs disappear, but then no files have been reloaded, and you have to go through files and click Revert (keeping fingers crossed you don't accidentally revert a file you actually was working on).

This don't happen every time, but quite often, when multiple files are modified externally at the same time.

A quick fix could be to add the possibility to press e.g. the first letter ("R" for reload and "C" for cancel, "A" for ignore all) that way the dialogs could be answered even if not visible.
A better fix would be to ensure the topmost dialog have focus (or focused dialog is on top), and/or that the dialogs can be moved away. But this is perhaps the window manager that decide.
The best fix IMHO would be that every dialog can be clicked and not just one specific.

Another possible fix could be to have just one dialog for all reloaded files with check-boxes for which to reload or not, the problem with that is that new changes can happen while that dialog is open, so then it would need to be updated "on the fly" (and that would be a feature rather than bug-fix).

Steps to reproduce

Open ST3 in --safe--mode
Open three (scratch) files and make a small change to each of them (or disable auto-reload).
Open a shell and add something to all three files.
Go back to ST3 and try to click the "Reload?" dialog that's on top.
Sometime it works but often not.

Expected behavior

The visible dialog can be clicked with the mouse.

Actual behavior

The visible dialog can not be clicked.
(The dialog that could receive clicks are hidden below and hence can't get clicks either in reality)

Sublime Text build number

4200

Operating system & version

Ubuntu 24.04.4 LTS

(Linux) Desktop environment and/or window manager

Gnome

Additional information

No response

OpenGL context information


Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions