Skip to content
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

[electron] The Select All command executes incorrectly #6428

Closed
kittaakos opened this issue Oct 21, 2019 · 3 comments · Fixed by #7481
Closed

[electron] The Select All command executes incorrectly #6428

kittaakos opened this issue Oct 21, 2019 · 3 comments · Fixed by #7481
Labels
bug bugs found in the application electron issues related to the electron target

Comments

@kittaakos
Copy link
Contributor

Description

I have forcefully enabled all menu items in electron to see the Selection menu (#6425). When I did a Select All, not the focus item was selected, but the monaco editor's content. It works perfectly in the browser.

Electron:
screencast 2019-10-21 19-16-51

Browser:
screencast 2019-10-21 19-19-16

Note, the Select All does not work in electron either when I close the editor and have the focus on an input.

Reproduction Steps

OS and Theia version:
macOS, f255f5a

Diagnostics:

@vince-fugnitto vince-fugnitto added bug bugs found in the application electron issues related to the electron target labels Oct 21, 2019
@kittaakos
Copy link
Contributor Author

@kittaakos
Copy link
Contributor Author

VS Code makes differences whether the text has the focus in the active editor or not.

https://github.com/microsoft/vscode/blob/f7118fd368dd088d66ed95527e5c16e9504c4081/src/vs/editor/browser/controller/coreCommands.ts#L1602-L1603

We don't:

/**
* ID of a keybinding context that is enabled when the active text editor has the focus.
*/
export const editorTextFocus = 'editorTextFocus';

@akosyakov
Copy link
Member

There is strictEditorTextFocus for only text focus.

kittaakos pushed a commit that referenced this issue Mar 14, 2020
From now on, when executing the `Undo`, `Redo`, and `Select All` command
handlers, we do not focus the `current` editor but follow the following
execution order:

 - Executes on the `current` editor if it has text focus.
 - Otherwise, if the `document.activeElement` is either an `input` or a
 `textArea`, executes the browser's built-in command on it.
 - Otherwise, executes on the `current` editor after setting the focus
on it.

Closes: #6428
Closes: #2756

Signed-off-by: Akos Kitta <kittaakos@typefox.io>

rewrote it a bit.

Signed-off-by: Akos Kitta <kittaakos@typefox.io>

aligned name.

Signed-off-by: Akos Kitta <kittaakos@typefox.io>

s

Signed-off-by: Akos Kitta <kittaakos@typefox.io>
kittaakos pushed a commit that referenced this issue Mar 14, 2020
From now on, when executing the `Undo`, `Redo`, and `Select All` command
handlers, we do not focus the `current` editor but follow the following
execution order:

 - Executes on the `current` editor if it has text focus.
 - Otherwise, if the `document.activeElement` is either an `input` or a
 `textArea`, executes the browser's built-in command on it.
 - Otherwise, executes on the `current` editor after setting the focus
on it.

Closes: #6428
Closes: #2756

Signed-off-by: Akos Kitta <kittaakos@typefox.io>
kittaakos pushed a commit that referenced this issue Apr 1, 2020
Signed-off-by: Akos Kitta <kittaakos@typefox.io>
kittaakos pushed a commit that referenced this issue Apr 1, 2020
Signed-off-by: Akos Kitta <kittaakos@typefox.io>
kittaakos pushed a commit that referenced this issue Apr 2, 2020
Signed-off-by: Akos Kitta <kittaakos@typefox.io>
kittaakos pushed a commit that referenced this issue Apr 2, 2020
Signed-off-by: Akos Kitta <kittaakos@typefox.io>
kittaakos pushed a commit that referenced this issue Apr 2, 2020
Signed-off-by: Akos Kitta <kittaakos@typefox.io>
kittaakos pushed a commit that referenced this issue Apr 2, 2020
Closes #6428

Signed-off-by: Akos Kitta <kittaakos@typefox.io>
kittaakos pushed a commit that referenced this issue Apr 2, 2020
Closes #6428

Signed-off-by: Akos Kitta <kittaakos@typefox.io>
kittaakos pushed a commit that referenced this issue Apr 2, 2020
Closes #6428

Signed-off-by: Akos Kitta <kittaakos@typefox.io>
kittaakos pushed a commit that referenced this issue Apr 2, 2020
Closes #6428

Signed-off-by: Akos Kitta <kittaakos@typefox.io>
kittaakos pushed a commit that referenced this issue Apr 2, 2020
Closes #6428

Signed-off-by: Akos Kitta <kittaakos@typefox.io>
kittaakos pushed a commit that referenced this issue Apr 3, 2020
Closes #6428

Signed-off-by: Akos Kitta <kittaakos@typefox.io>
kittaakos pushed a commit that referenced this issue Apr 3, 2020
Closes #6428

Signed-off-by: Akos Kitta <kittaakos@typefox.io>
kittaakos pushed a commit that referenced this issue Apr 4, 2020
Closes #6428

Signed-off-by: Akos Kitta <kittaakos@typefox.io>
kittaakos pushed a commit that referenced this issue Apr 6, 2020
Closes #6428

Signed-off-by: Akos Kitta <kittaakos@typefox.io>
kittaakos pushed a commit that referenced this issue Apr 6, 2020
Closes #6428

Signed-off-by: Akos Kitta <kittaakos@typefox.io>
akosyakov added a commit that referenced this issue Apr 8, 2020
akosyakov added a commit that referenced this issue Apr 14, 2020
akosyakov added a commit that referenced this issue Apr 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bugs found in the application electron issues related to the electron target
Projects
None yet
3 participants