-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Working set selection is wrong if sidebar hidden at launch #3637
Comments
This repros in Sprint 23 too, so not a result of the recent sidebar redesign |
I made a fix for this, but the fix I made has the side-effect of causing the sidebar to always open at launch, with the correct file selected in the working set, of course. Basically what I did was to save the current document to preferences when it changes and then when DocumentManager is loaded, it reads the prefs to initialize the _currentDocument with the document stored in prefs. Is it okay, or even desired, that the sidebar is always open at launch, or should I rework my code to keep the sidebar hidden if it was hidden at close? |
@jeffslofish I'm a little confused -- DocumentManager already does what you describe. See _savePreferences(), and _projectOpen()'s call to FILE_OPEN. I suspect what you're calling a side effect is the actual fix -- if the sidebar DOM nodes are visible, then the working set selection is initialized properly. If the sidebar DOM nodes are hidden, then it isn't. The best fix is probably to either: |
Reviewed @peterflynn - Peter since @jeffslofish started working on this please consider to be a reviewer to support this along. |
Added list of ways to show/hide sidebar. |
Confirmed fixed. Sorry for the delay, I missed that the fix landed and this wasn't set to FBNC yet. |
Note: there are several ways to hide/show the sidebar:
a. View > Hide Sidebar (View > Show Sidebar)
b. Cmd/Ctrl-Shift-H
c. Drag close/open
d. Double-click on drag bar to toggle
Result: file C is open in the editor but file A is selected in the working set
Expected: file C selected
The text was updated successfully, but these errors were encountered: