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

CMD+Return/CMD+Down on search result no longer focuses editor #68018

Closed
scarlac opened this issue Feb 7, 2019 · 13 comments
Closed

CMD+Return/CMD+Down on search result no longer focuses editor #68018

scarlac opened this issue Feb 7, 2019 · 13 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug candidate Issue identified as probable candidate for fixing in the next release search Search widget and operation issues verified Verification succeeded

Comments

@scarlac
Copy link

scarlac commented Feb 7, 2019

Issue Type: Bug

After Feburary update it's no longer possible to keyboard navigate from a search result into the editor area. This means that doing a Find in Files search can no longer be performed with keyboard only. It's possible to Open Results in Side view but not open in active view.

VS Code version: Code 1.31.0 (7c66f58, 2019-02-05T22:32:14.164Z)
OS version: Darwin x64 18.2.0

System Info
Item Value
CPUs Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz (12 x 2200)
GPU Status 2d_canvas: enabled
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: enabled
rasterization: enabled
surface_synchronization: enabled_on
video_decode: enabled
webgl: enabled
webgl2: enabled
Load (avg) 2, 2, 2
Memory (System) 32.00GB (0.58GB free)
Process Argv -psn_0_4092903
Screen Reader no
VM 0%
Extensions (9)
Extension Author (truncated) Version
unique-lines bib 1.0.0
vscode-eslint dba 1.8.0
json-pretty-printer eus 1.1.0
graphql-for-vscode kum 1.13.0
mssql ms- 1.4.0
csharp ms- 1.17.1
Go ms- 0.9.0
sublime-keybindings ms- 4.0.0
color-highlight nau 2.3.0
@vscodebot vscodebot bot added the new release label Feb 7, 2019
@roblourens roblourens added bug Issue identified by VS Code Team member as probable bug search Search widget and operation issues labels Feb 7, 2019
@roblourens
Copy link
Member

In 1.30 I see it focus the editor with just 'enter' or 'cmd+down' but not 'cmd+enter', is that right?

You can use a workaround like 'cmd+1' to focus the editor in the meantime.

@roblourens roblourens added this to the February 2019 milestone Feb 7, 2019
@scarlac
Copy link
Author

scarlac commented Feb 7, 2019

@roblourens Sorry, I may have different keybindings. Both Return, CMD+Down, and CMD+Enter does not work to focus the text field.
CMD+1 doesn't work well as a workaround, as it makes changes focused line away from the highlighted search result.

@scarlac scarlac changed the title CMD+Return on search result no longer focuses editor CMD+Return/CMD+Down on search result no longer focuses editor Feb 7, 2019
@josh08h
Copy link

josh08h commented Feb 7, 2019

I've encountered the same issue in Version 1.31.0.

I've bound enter to the following:

{
        "key": "enter",
        "command": "list.select",
        "when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
    }

list.select no longer focuses the editor.

@roblourens
Copy link
Member

FYI @joaomoreno @isidorn this is goes back to #64743 and the tree resource navigator vs open event, etc.

My proposed fix would be that the list.select handler would put some property on the keyboard event that we can check downstream that would mean "preserveFocus = false". But have any similar issues come up?

@roblourens roblourens added the candidate Issue identified as probable candidate for fixing in the next release label Feb 7, 2019
@roblourens
Copy link
Member

This also affects the callstack and loaded scripts views @isidorn

@scarlac
Copy link
Author

scarlac commented Feb 8, 2019

Thank you, @roblourens 🌟

@Tyriar
Copy link
Member

Tyriar commented Feb 11, 2019

Verified, found this though #68469

@Tyriar Tyriar added the verified Verification succeeded label Feb 11, 2019
@scarlac
Copy link
Author

scarlac commented Feb 12, 2019

I just confirmed that 1.31.1 fixed this. Thank you to all for the quick turnaround here! 👏 💯

@Spown
Copy link

Spown commented Feb 13, 2019

this is probably causing #68515

@akbyrd
Copy link
Contributor

akbyrd commented Feb 14, 2019

This does not seem to be fixed.

  • list.select is broken. It does nothing when in search results.
  • Enter does absolutely nothing in the search results (Expected: focus the editor. I'm pretty sure this was the default behavior previously and has now changed.)
  • Ctrl + Enter doesn't do the same thing as double clicking (Expected: they do the same thing.)
  • Ctrl + Enter opens a second editor next to your current one. So if you use arrow keys to select a search result it moves the current editor to the result line, then when you press Ctrl + Enter it opens an entirely new editor next to the current one. Now you have two editors open to the same place next to each other. wat. (Expected: go to the search result in the current editor).

More broadly speaking, keyboard navigation in the search results is wildly unintuitive and non-standard. The UX is just bad.

EDIT: I can't find the system installer for an older version so even rolling back in an unnecessary pain. Ugh.
EDIT2: Manual URL fiddling. Yay. https://stackoverflow.com/questions/49346733/how-to-downgrade-vscode#comment95235333_49347158

@roblourens
Copy link
Member

There have been several issues due to swapping out the tree implementation with this release. Do you have workbench.list.openMode set to doubleClick? If so, #68469 is fixed in Insiders.

Ctrl+enter is "Open to side" so that's expected. Other file trees have the same behavior. It just seems weird because as you point out, the item is also opened automatically when you focus it.

@akbyrd
Copy link
Contributor

akbyrd commented Feb 16, 2019

Yes, I'm set to doubleClick. Sounds like ctrl + enter is working as expected then. but plain old enter doesn't work. I can't actually open search results in the editor. The linked issues doesn't appear to cover this problem.

@roblourens
Copy link
Member

roblourens commented Feb 16, 2019

cmd+down is the same as enter, so #68469 should cover it. You could try Insiders to check.

@vscodebot vscodebot bot locked and limited conversation to collaborators Mar 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug candidate Issue identified as probable candidate for fixing in the next release search Search widget and operation issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

6 participants