Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Escape no longer returns focus to editor #1113

Closed
1 task done
spalger opened this issue May 22, 2017 · 5 comments
Closed
1 task done

Escape no longer returns focus to editor #1113

spalger opened this issue May 22, 2017 · 5 comments

Comments

@spalger
Copy link

spalger commented May 22, 2017

Prerequisites

Description

As of atom 1.18.0-beta0, focussing a file with the tree-view:reveal-active-file command then pressing the escape key no longer restores focus to the editor.

Steps to Reproduce

  1. Open a file
  2. Focus the editor
  3. Execute tree-view:reveal-active-file command
  4. Press escape key

Expected behavior: Focus should be restored to the editor

Actual behavior: Focus is held by the tree-view

Reproduces how often: 100% of the time

Versions

macOS 10.12.5
atom 1.18.0-beta0
tree-view 0.217.0-7

@rsese
Copy link

rsese commented May 22, 2017

Thanks for the report! I had 1.16.0 installed on another machine and can confirm that focus did return to the open file following your steps to reproduce but the actual behavior is as you described in 1.18.0-beta0 and in 1.17.0.

@llondon6
Copy link

I'm also experiencing this issue. A fix would be much appreciated.

@Whale-Street
Copy link

I thought I was experiencing this issue, but It turned out to be 'synced-sidebar' package.
peterdotjs/atom-synced-sidebar#33

@jasonrudolph
Copy link
Contributor

As far as I can tell, this is a side effect of Atom 1.17 moving the tree view from a Panel to a Dock.

In Atom 1.16, with the tree-view focused, hitting escape triggers this keybinding defined in atom/atom:

'.tool-panel.panel-left, .tool-panel.panel-right':
  'escape': 'tool-panel:unfocus'

In Atom 1.17, with the tree-view focused, hitting escape triggers no keybindings at all.

Because the keybinding above applied to anything that existed in the left or right tool panels, you could argue that we should define a similar keybinding for docks. However, I think it might be too soon to say whether we want escape to universally provide this behavior for all docks. I'd prefer to give package authors time to make use of docks for a while before implementing any global keybindings for docks.

For now, I'm leaning toward adding an escape keybinding to tree-view. With the tree view focused, hitting escape would focus the active item in the workspace center.

What do y'all think?

@pixilz
Copy link

pixilz commented Jun 8, 2017

@jasonrudolph I can't see any problems with your proposed solution.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants