Browse Source

Disable global tabbing when clicking

master
meriadec 7 years ago
parent
commit
2c3ee41efa
No known key found for this signature in database GPG Key ID: 1D2FC2305E2CB399
  1. 1
      src/config/global-tab.js
  2. 6
      src/renderer/init.js

1
src/config/global-tab.js

@ -5,3 +5,4 @@ let IS_GLOBAL_TAB_ENABLED = false
export const isGlobalTabEnabled = () => IS_GLOBAL_TAB_ENABLED
export const enableGlobalTab = () => (IS_GLOBAL_TAB_ENABLED = true)
export const disableGlobalTab = () => (IS_GLOBAL_TAB_ENABLED = false)

6
src/renderer/init.js

@ -11,7 +11,7 @@ import moment from 'moment'
import createStore from 'renderer/createStore'
import events from 'renderer/events'
import { enableGlobalTab, isGlobalTabEnabled } from 'config/global-tab'
import { enableGlobalTab, disableGlobalTab, isGlobalTabEnabled } from 'config/global-tab'
import { fetchAccounts } from 'actions/accounts'
import { fetchSettings } from 'actions/settings'
@ -82,6 +82,10 @@ async function init() {
logger.onTabKey(document.activeElement)
}
})
window.addEventListener('click', () => {
if (isGlobalTabEnabled()) disableGlobalTab()
})
}
}

Loading…
Cancel
Save