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

Focus issues with Home/End in Autocomplete dialog #18656

Closed
thekalinga opened this issue Jan 17, 2017 · 3 comments
Closed

Focus issues with Home/End in Autocomplete dialog #18656

thekalinga opened this issue Jan 17, 2017 · 3 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug suggest IntelliSense, Auto Complete
Milestone

Comments

@thekalinga
Copy link

thekalinga commented Jan 17, 2017

  • VSCode Version:

Version 1.9.0-insider
Commit 2cdc2b3
Date 2017-01-13T07:03:18.620Z
Shell 1.4.6
Renderer 53.0.2785.143
Node 6.5.0

  • OS Version:

Ubuntu 14.04

Steps to Reproduce:

  1. Type something that triggers auto complete
  2. Press up & down arrow. Press pagup & pagedown. In both cases, focus moves within the auto suggestions dialog
  3. Now press home/end, the auto complete dialog closes & the cursor moves to the start of the line. Instead the first/last item in the auto suggest needs to be selected in the dialog without closing the auto suggest window.

Why should the implementation for Home/End buttons needs to be changed?

  1. Because the user was interested in narrowing down the auto suggest results by pressing up/down/pgup/pgdn/the key combination that triggers auto suggestions ctrl+space. So we should assume that he would be interested in moving within the autosuggest dialog when he presses either home/end after he presses any of the key combinations mentioned above

  2. IntelliJ implementation is along similar lines

Suggestion on the implementation of handling Home/End.

  1. If the user starts typing & auto suggest window automatically opens up, home/end will take the user to start/end of the line in the editor after closing the dialog (the current behaviour)
  2. If the home/end buttons are pressed after user presses up/down/pgup/pgdn/ctrl+space keys, the subsequent home/end buttons should move the focus within the dialog, not in the editor
@joaomoreno joaomoreno added feature-request Request for new features or functionality suggest IntelliSense, Auto Complete bug Issue identified by VS Code Team member as probable bug and removed feature-request Request for new features or functionality labels Jan 18, 2017
@joaomoreno joaomoreno added this to the Backlog milestone Jan 18, 2017
@mlewand
Copy link
Contributor

mlewand commented Apr 12, 2017

@joaomoreno this issue got fixed by #20156.

@joaomoreno
Copy link
Member

Thanks man!

@joaomoreno
Copy link
Member

Due to #24673, I've removed the keybindings for Home and End, but left the commands in. If you'd like those keys to be handled by the suggest widget, add the following to your keybindings.json:

{
    "key": "home",
    "when": "editorTextFocus && suggestWidgetMultipleSuggestions && suggestWidgetVisible",
    "command": "selectFirstSuggestion"
},
{
    "key": "end",
    "when": "editorTextFocus && suggestWidgetMultipleSuggestions && suggestWidgetVisible",
    "command": "selectLastSuggestion"
}

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
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 suggest IntelliSense, Auto Complete
Projects
None yet
Development

No branches or pull requests

3 participants