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

Set the panel flag as focused when activate() is called #19206

Merged
merged 1 commit into from Apr 25, 2019

Conversation

Projects
None yet
2 participants
@rafeca
Copy link
Contributor

commented Apr 24, 2019

Identify the Bug

Programmatically calling pane.activate() does not currently update its isFocused() state.

This PR fixes #18913

Description of the Change

This PR changes the logic to set the focused flag on the activate() method instead of the focus() method. Since focus() always calls activate() this should not affect that method.

Alternate Designs

N/A

Possible Drawbacks

🤷‍♂️

Verification Process

Open Atom and execute the following from the developer console:

const assert = require('assert')
const pane = atom.workspace.paneForURI('atom://config')
assert.ok(!pane.isFocused())
pane.activate()
assert.ok(pane.isFocused()) 

Release Notes

Fixed pane.activate() to update the panel isFocused() state.

@rafeca rafeca merged commit 1a767bc into master Apr 25, 2019

1 check passed

Atom Pull Requests #20190424.1 succeeded
Details

@rafeca rafeca deleted the focus-on-activate branch Apr 25, 2019

@nathansobo

This comment has been minimized.

Copy link
Contributor

commented Apr 25, 2019

Nice, simple change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.