Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Can lose changes by accidentally clicking where file sync from disk dialog will appear #556

@peterflynn

Description

@peterflynn
  1. Make some edits in Brackets -- don't save your changes yet
  2. Leave Brackets and modify (or delete) the same file on disk
  3. Return to Brackets -- you'll get a prompt about keeping your editor changes vs. refreshing from disk
  4. Put your finger on the computer screen where the destructive button is (the 'lose editor changes' button)
  5. Click the other button to keep your changes for now... but keep your finger in place
  6. Switch to a different app, but leave the Brackets window uncovered
  7. Move the mouse to where your finger is, and click in the Brackets window

Result: your editor changes have been blown away without warning

This happens because the window gains activation on mousedown, and the dialog appears... and then the mouseup triggers the button in the dialog.

Note that these long repro steps are needed only to reliably hit the bug. You could hit this by accident -- by clicking in an unlucky spot -- just by doing steps 1,2,7.

In theory, any asynchronous process that spawns a popup dialog without user interaction could have this same issue. So hopefully there's a generic solution for this we can put into Dialog.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions