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

Weird issue when closing tabs #12162

Closed
arashsa opened this issue Jan 27, 2016 · 15 comments
Closed

Weird issue when closing tabs #12162

arashsa opened this issue Jan 27, 2016 · 15 comments

Comments

@arashsa
Copy link

arashsa commented Jan 27, 2016

Whenever I have a tab open, and I close it and the file has not been saved, I am asked if I want to save the file, which I do, and what happens is that the content of that file is then copied to another file that also is open. Very strange behaviour. Have never encountered anything similar. Brackets seem to have a lot of issues with files.

@swmitra
Copy link
Collaborator

swmitra commented Jan 27, 2016

@arashsa Do you see the same tab appearing twice which seems like 2 entries of the same file?

@petetnt
Copy link
Collaborator

petetnt commented Jan 27, 2016

If this is not related to the same doc both views-feature...:

@swmitra I have sometimes ran into a situation where the title bar shows foo.js but the file contents are of bar.js which was open on the pane previously. See the last part of this:

#11820 (comment)

I have ran into it once or twice after that, but I haven't been able to repeat it. It could be related to #11826 though too.

@arashsa
Copy link
Author

arashsa commented Jan 27, 2016

@swmitra No, the actual content of one file gets copied over to another file. Has been happening a few times lately. Very annoying, and when it happens, sometimes I can't the the old content back, and need to pull the file from git.

@petetnt Does not seem to be related.

@petetnt
Copy link
Collaborator

petetnt commented Jan 27, 2016

@arashsa Then it seems to be the thing I described in #11820 (comment).

You don't actually lose the contents until you save the file (the document isn't marked dirty either), but if you make a change it does lead to data loss which sucks.

@arashsa
Copy link
Author

arashsa commented Jan 27, 2016

@petetnt No, not really. You are describing changes to the same file in two different panes, I am having issues with two separate files, which is very strange. And these files are not open in different panes, but in different tabs. So let's say I change something in one scss file (only experienced this with scss files), and then I don't save it, but close the tab, then say yes to the popup that asks to save, then another file that is opened suddenly is overwritten with the content of the file I just closed. I think it has been the file that gets open after I have closed the other file.

This seems somewhat unrelated to your issue, no?

@petetnt
Copy link
Collaborator

petetnt commented Jan 27, 2016

@arashsa Actually that's the exact scenario I am facing, the wording here is kinda bad (the header is flipper around: it should say that title changes but the contents are the same) though:

Haven't been able to repeat this in a repeatable manner, but sometimes when closing files that are duplicated, pane text and the contents of the file don't match. Might be related to the working set behavior. Saving the file in this state brings tons of unsuspected behaviors.

For example if I close foo.scss, pane header shows bar.scss but the file contents are of foo.scss. If I close Brackets the bar.scss contents haven't actually changed.

@arashsa
Copy link
Author

arashsa commented Jan 27, 2016

@petetnt Oh, sorry about that. So, any solutions?

@swmitra
Copy link
Collaborator

swmitra commented Jan 27, 2016

@petetnt @arashsa let me see, if I can repro this then work on the solution tonight.

@petetnt
Copy link
Collaborator

petetnt commented Jan 27, 2016

I tried to repro this for a while just now but couldn't. Hopefully you have better luck

@adriennn
Copy link

I have the same problem. Just updated to 1.6 on Ubuntu 14.04 and anytime I make a modification to an opened file, it opens a new tab when upon saving.

edit: looks like a css issue (see the new styles), because I don't see those new styles.

@petetnt
Copy link
Collaborator

petetnt commented Jan 30, 2016

@adriennn The flip-view buttons, by default, are visible when hovering over the header bar (you can toggle that from preferences).

The other thing might be due to #11820 ?

If not, can you provide some screens how your panes look like after saving (and what is the expected outcome)

@adriennn
Copy link

hey @petetnt,
after trying some stuff, I finally realize it was down to the "Documents Toolbar" extension (I forgot brackets didn't have the file tabs above the panels by default), so I guess I'll revert to 1.5 until that extension is fixed. see issue. So my issue wasn't the same as @arashsa, I got confused with his mention of tabs.

@dnbard
Copy link

dnbard commented Feb 3, 2016

Looks like Brackets events aren't sent anymore in Brackets v1.6.0.

I can reproduce the issue with API I'm using:
brackets issue

workingSetRemove event aren't triggered when file was removed from working files list - file is still in the list event after Close menu item was selected.

@petetnt
Copy link
Collaborator

petetnt commented Feb 3, 2016

@dnbard There's a fix tracking at #12145

@abose
Copy link
Contributor

abose commented Feb 25, 2016

A build refresh is scheduled by his week or next for 1.6 and after that the new installers posted will contain this fix.
Closing as fixed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants