Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Editor - Prompt warning when overwriting a file that is modified on disk #2783
Adds functionality to issue the user a warning and prompts them to overwrite the file currently modified on disk.
For any reviewer, I have a question:
Some notes I need to ponder about next time I take this on:
@gnestor, this should be all set for a merge. I've reverted the changes I've made to the test suite that were impacting the build. I was trying to create a test for this patch but came under time constraints from other duties. Let me know if you have any suggestions for my PR, or if I could be of anymore assistance for this bug.
@unnamedplay-r I checked this out and tested it and it appears to be working but not as I would expect.
@gnestor, when I perform the steps you provided, I don't experience any of the behavior you're describing. This has been tested on Mac's common browsers: Safari, Chrome, Firefox with cache cleared, and also done in private/incognito modes.
When I save a modified file, then re-save it, I'm not presented the overwrite modal. The modal appears only until I modify the second file in the other tab and save.
referenced this pull request
Feb 3, 2018
I tested this in Firefox and saw the same behaviour that @gnestor described, and I noticed an error message in the JS console about "
@unnamedplay-r I'm not sure why it was working for you but not for us. As I could see the error, I hope you don't mind me fixing it directly!