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

Commit

Permalink
Merge pull request #9897 from NejcZdovc/hotfix/#9889-devtools
Browse files Browse the repository at this point in the history
Fixes inspect element option when used by shortcut
  • Loading branch information
cezaraugusto committed Jul 8, 2017
1 parent 65482e1 commit 7efb0d0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions app/browser/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const siteTags = require('../../js/constants/siteTags')
// State
const {getByTabId} = require('../common/state/tabState')
const tabState = require('../../app/common/state/tabState')
const appStore = require('../../js/stores/appStore')

// Actions
const appActions = require('../../js/actions/appActions')
Expand Down Expand Up @@ -191,7 +192,7 @@ const createEditSubmenu = () => {
return submenu
}

const createViewSubmenu = (state) => {
const createViewSubmenu = () => {
return [
{
label: locale.translation('actualSize'),
Expand Down Expand Up @@ -266,7 +267,7 @@ const createViewSubmenu = (state) => {
accelerator: isDarwin ? 'Cmd+Alt+I' : 'Ctrl+Shift+I',
click: function () {
const win = BrowserWindow.getActiveWindow()
const activeTab = tabState.getActiveTab(state, win.id)
const activeTab = tabState.getActiveTab(appStore.getState(), win.id)
appActions.toggleDevTools(activeTab.get('tabId'))
}
},
Expand Down Expand Up @@ -537,7 +538,7 @@ const createMenu = (state) => {
const template = [
{ label: locale.translation('file'), submenu: createFileSubmenu() },
{ label: locale.translation('edit'), submenu: createEditSubmenu() },
{ label: locale.translation('view'), submenu: createViewSubmenu(state) },
{ label: locale.translation('view'), submenu: createViewSubmenu() },
{ label: locale.translation('history'), submenu: createHistorySubmenu() },
{ label: locale.translation('bookmarks'), submenu: createBookmarksSubmenu(state) },
{
Expand Down

0 comments on commit 7efb0d0

Please sign in to comment.