-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Missing keyboard focus when file opened via single click #7170
Comments
|
@Anasshahidd21 in your screenshot the The difference is hard to tell from looking at the tabs though: But there are more oddities to the preview feature, e.g. editor's status bar contributions ... |
Fixes: eclipse-theia#7170 When opening a file with with a single click from the File Explorer widget, the opened editor widget doesn't have keyboard focus. But now the focus is updated. Signed-off-by: Muhammad Anas Shahid <[email protected]>
Editor preview should never receive a focus if opened on a single click. It is the point of preview that you can navigate through files in the explorer and preview another file. |
Title: [editor] Show languages while preview This issue fixes the underlying problem where when a new file was opened in preview mode, the focus was on the previously active file and not on the navigator + the statusbar at the bottom was not updated. This PR collectively fixes both the issues. Signed-off-by: Muhammad Anas Shahid <[email protected]>
Why do we still trying to fix it? What is the issue here? As I said the editor preview should not be focused while navigating through the explorer. It is by design. |
@akosyakov sorry for the confusion with the editor preview. 'should have recorded with a Theia without it. It's independent of the editor preview. If you just do a single click in the tree, and then try to search in the then opened editor widget, it won't be possible. |
I can confirm this issue and want to bring up another problem with this behavior: This happens when the When open a Python file with one click and then switch to the debug view to debug the current file, as in the screenshot below, it is not the newly opened file that will be debugged but the previously opened one that had the focus the last time (in this case the readme). Since there is not marker that the file never had the focus (as the italic font when In my opinion, when |
I think it is in the right direction. There is another preference which controls when something should be opened with a focus something like |
Yes, setting However, still find the behavior of |
I've just checked VS Code when the editor preview is disabled and it behaves the same, not sure whether we want to do it differently and what would be implications. |
Actually I don't care if the editor gets the focus or not. I have no problem with the way it is in VSCode. For me, the real issue in Theia is that the debugger (or other functions that rely on what the currently opened file is) does not realize that a file was opened when you use a single click. From the users perspective, I see no difference in the editor view between a single or double clicked file and when I start the debugger I expect that the file of the editor in the foreground will be debugged. Fun thing: In VSCode you can also debug a preview file (when the filename is italic etc.). You don't need to open the file with active focus. For my taste this is too much. However, when you open a file and you don't have a visual feedback that this file is opened in preview mode only, I would expect that this file is used for debugging when I debug the “current” file (it's also a customer feedback, btw). Probably we could change this behavior somehow? |
That is not the same behavior. Even with |
@AlexTugarev @corneliusludmann We could introduce a new reference something like a last revealed editor? We could then redefine a context to check first last focused editor and if it is missing then fallback to last revealed. I would assume that in case if a navigator is focused then (last) focused editor will be undefined, but last revealed will be updated as one navigates through rows? Edited: redefining context is quite a big refactoring, maybe we can rather redefine what is a current editor, maybe like in #7170 (comment) |
Somehow It feels that defining a current widget as last focused is not enough for a specific kind. Similar discussion here: #7260 (comment) Should it be then always as following: it is either a last focused widget or a last revealed widget. It means that while there is an active widget of some kind then current should point to it, but as soon as there is no it should first point to previous active, but then start following revealed. cc @elaihau If we agree on it then in #7260 you don't need another reference, but rather we need some concept like |
…used editor Signed-off-by: Anton Kosyakov <[email protected]>
…used editor Signed-off-by: Anton Kosyakov <[email protected]>
…used editor Signed-off-by: Anton Kosyakov <[email protected]>
…used editor Signed-off-by: Anton Kosyakov <[email protected]>
…used editor Signed-off-by: Anton Kosyakov <[email protected]>
Signed-off-by: Anton Kosyakov <[email protected]>
Description
When opening a file with with a single click from the File Explorer widget, the opened editor widget doesn't have keyboard focus.
Reproduction Steps
ctrlcmd+f
The text was updated successfully, but these errors were encountered: