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

Commit

Permalink
Open a bookmark item in a foreground tab
Browse files Browse the repository at this point in the history
If SWITCH_TO_NEW_TABS is truthy (or if Shift key is pressed: this is the
current behavior)

Auditors: Unsure what to fill in here

Test Plan:
  - Simulate middle clicking a bookmark item
  - Check that a new foreground tab is opened with the same URL as that of the
  bookmark (or just check that if such an event is fired if a URL check is not
  feasible)

Fix #3207.
  • Loading branch information
GreenRecycleBin committed Nov 24, 2016
1 parent ca62650 commit 3658897
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion js/actions/bookmarkActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
const siteUtil = require('../state/siteUtil')
const windowActions = require('./windowActions')
const eventUtil = require('../lib/eventUtil')
const {SWITCH_TO_NEW_TABS} = require('../constants/settings')
const getSetting = require('../settings').getSetting

const bookmarkActions = {
openBookmarksInFolder: function (allBookmarkItems, folderDetail) {
Expand All @@ -31,7 +33,7 @@ const bookmarkActions = {
windowActions.newFrame({
location: bookmarkItem.get('location'),
partitionNumber: bookmarkItem && bookmarkItem.get && bookmarkItem.get('partitionNumber') || undefined
}, !!e.shiftKey)
}, !!e.shiftKey || getSetting(SWITCH_TO_NEW_TABS))
} else {
windowActions.loadUrl(activeFrame, bookmarkItem.get('location'))
}
Expand Down

0 comments on commit 3658897

Please sign in to comment.