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

Commit

Permalink
Restore border coloring on Windows
Browse files Browse the repository at this point in the history
Fixes #8778

Auditors: @bridiver
  • Loading branch information
bsclifton committed May 10, 2017
1 parent be678e2 commit b816b37
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions js/components/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -470,11 +470,13 @@ class Main extends ImmutableComponent {
window.addEventListener('focus', () => {
const activeFrame = frameStateUtil.getActiveFrame(self.props.windowState)
windowActions.setFocusedFrame(activeFrame)
windowActions.onFocus(getCurrentWindowId())
// For whatever reason other elements are preserved but webviews are not.
if (document.activeElement && document.activeElement.tagName === 'BODY') {
webviewActions.setWebviewFocused()
}
})
windowActions.onFocus(getCurrentWindowId())

// disable dnd by default
window.addEventListener('dragover', function (event) {
Expand Down Expand Up @@ -503,6 +505,7 @@ class Main extends ImmutableComponent {

window.onblur = () => {
self.resetAltMenuProcessing()
windowActions.onBlur(getCurrentWindowId())
}
}

Expand Down

0 comments on commit b816b37

Please sign in to comment.