Skip to content

fix: check for pane focus before removing it. - #17164

Merged
ckerr merged 1 commit into
masterfrom
check-focus-manager-first
Mar 4, 2019
Merged

ckerr merged 1 commit into
masterfrom
check-focus-manager-first

Conversation

@ckerr

@ckerr ckerr commented Feb 27, 2019

Copy link
Copy Markdown
Member

Fixes #16883. This bug seems to have been introduced as a side-effect of #15302's menu a11y refactor and is new in 5-0-x.

Description of Change

The a11y refactor introduced code that tries to remove pane focus in atom::MenuBar::OnBeforeExecuteCommand() whether it has focus or not, and calling AccessiblePaneView::RemovePaneFocus() when it doesn't have focus results in a nullptr dereference.

This PR adds a test to check for pane focus before removing it.

CC @brenca

Checklist

Release Notes

Notes: Fixed 5.0.0-beta.1 menuitem crash on Windows and Linux

Fixes #16883. This bug seems to have been introduced in the #15302's
menu a11y refactor and is new in 5-0-x.
@electron-cation electron-cation Bot added the new-pr 🌱 PR opened recently label Feb 27, 2019
@ckerr
ckerr requested a review from brenca February 27, 2019 21:57
@ckerr ckerr added target/5-0-x semver/patch backwards-compatible bug fixes labels Feb 27, 2019
@electron-cation electron-cation Bot removed the new-pr 🌱 PR opened recently label Feb 28, 2019

@codebytere codebytere left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@brenca for final opinion but this looks great to me!

@brenca brenca left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@ckerr
ckerr merged commit ed31cfe into master Mar 4, 2019
@release-clerk

release-clerk Bot commented Mar 4, 2019

Copy link
Copy Markdown

Release Notes Persisted

Fixed 5.0.0-beta.1 menuitem crash on Windows and Linux

@trop

trop Bot commented Mar 4, 2019

Copy link
Copy Markdown
Contributor

I have automatically backported this PR to "5-0-x", please check out #17215

@MarshallOfSound
MarshallOfSound deleted the check-focus-manager-first branch June 5, 2019 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

semver/patch backwards-compatible bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants