-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CLOSED] Safer focusedEditorChanged event #1826
Comments
I've added detailed notes in #1257 about the two known cases that this patch didn't fix. |
I've run unit tests and gone through a gauntlet of different cases, verifying that the status bar appears correct, editors get disposed properly, focusedEditorChange is fired a sane number of times & with the right arguments, etc. But with something core like this, the more testing the better too! |
Initial review complete. Thanks for helping out with this one. |
In this comment for #1257, you mention changing getFocusedEditor() to simply return _lastFocusedEditor. Did you try that? It seems like that may be a good solution to the timing discrepancies. |
I did some scenario testing with this branch and everything works great. |
Re making getFocusedEditor() return _lastFocusedEditor: I'd like to look at its callers first to verify that no one is expecting null whenever something other than an Editor is focused. We could try to hack it to return null in those cases to preserve the old behavior, but it'd be more useful if we changed its behavior to only return null when there's no editor open. That would actually help us solve some of our focus management problems (e.g. #301, #547). I'd rather wait till next sprint so we can take our time on that. |
Looks good. Did some scenario testing with the working set, project tree and inline editors. |
Thursday Oct 18, 2012 at 06:02 GMT
Originally opened as adobe/brackets#1877
Make editor-swapping more independent from the focusedEditorChanged event, and make the event to fire more consistently.
This fixes the scrolling issue Randy reported in #1864. I think it also fixes all the cases listed in #1860, and it further improves upon #1257 to the point where it's almost fixed.
Code changes:
(Doing a
git difftool a82cfded^ -- src/editor/EditorManager.js
on this branch helps show the similarity to the original code).peterflynn included the following code: https://github.com/adobe/brackets/pull/1877/commits
The text was updated successfully, but these errors were encountered: