dnbard / brackets-documents-toolbar

Extension that adds new toolbar with a list of all open documents.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

File names disappear in tabs after minimize/maximize

ovk opened this issue · comments

commented

After minimizing and then maximizing Brackets filenames on all opened tabs disappear:

brackets

The only "fix" is to restart Brackets. Reproducible on Windows 8.1 and Windows Server 2012.
Brackets version: Release 1.1 build 1.1.0-15558 (release ea908cae5)

I can't reproduce this on my PC (you might have issues with another installed extensions).

commented

This is strange, because this issue is 100% reproducible on both of my PCs.
It only occurred after upgrading brackets to 1.1. Documents Toolbar version is 0.5.2.
This is how to reproduce the issue:

aeaf4ea4608ec95cbaaa60614bb273fa

I had this issue after updating to the latest version of the Brackets.
My simple solution is, edit the main.css file located in the styles folder.

.ext-documents .document-name{
    ...
    ...
    min-width: 5em; /* add this script.*/
}

Everything goes back to normal and I can continue to use this great extension.

commented

Thanks, @ThemeOn. This prevents tabs from collapsing completely, so it is great as a temporary solution.

Great! Will some of you want to create Pull Request with the fix ?

commented

@dnbard, the fix suggested by @ThemeOn is just a workaround. It prevents tabs from complete collapse to zero-width, but it doesn't fixes the root-cause.
It seems like the problem is in this line in tabService.js:

$doc.width(width * (1 - (1 - ratio) / documentsNameWidth * docHolderWidth));

When the ratio is negative, the tab width becomes a negative causing tab to collapse.
I have created a pull request with the code which fixes this issue for me, so you can check it and merge.

commented

Verified in 0.5.3