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

Fix #3068 #4317

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions docs/windowActions.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,13 +215,14 @@ Dispatches a message to the store to create a new frame
**Parameters**

**frameOpts**: `Object`, An object of frame options such as isPrivate, element, and tab features.
These may not all be hooked up in Electron yet.
These may not all be hooked up in Electron yet.

**openInForeground**: `boolean`, true if the new frame should become the new active frame
**openInForeground**: `boolean`, true if the new frame should become the new active frame.
If missing, this value will be defaulted to the user's preference (SWITCH_TO_NEW_TABS).



### cloneFrame(frameProps, guestInstanceId)
### cloneFrame(frameProps, guestInstanceId, openInForeground)

Dispatches a message to the store to clone an existing frame

Expand All @@ -231,6 +232,9 @@ Dispatches a message to the store to clone an existing frame

**guestInstanceId**: `number`, The guestInstanceId of the cloned webcontents

**openInForeground**: `boolean`, true if the new frame should become the new active frame.
If missing, this value will be defaulted to the user's preference (SWITCH_TO_NEW_TABS).



### closeFrame(frames, frameProps)
Expand Down
7 changes: 5 additions & 2 deletions js/actions/windowActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,9 @@ const windowActions = {
* Dispatches a message to the store to create a new frame
*
* @param {Object} frameOpts - An object of frame options such as isPrivate, element, and tab features.
* These may not all be hooked up in Electron yet.
* @param {boolean} openInForeground - true if the new frame should become the new active frame
* These may not all be hooked up in Electron yet.
* @param {boolean} openInForeground - true if the new frame should become the new active frame.
* If missing, this value will be defaulted to the user's preference (SWITCH_TO_NEW_TABS).
*/
newFrame: function (frameOpts, openInForeground) {
dispatch({
Expand All @@ -297,6 +298,8 @@ const windowActions = {
*
* @param {Object} frameProps - The properties of the frame to clone
* @param {number} guestInstanceId - The guestInstanceId of the cloned webcontents
* @param {boolean} openInForeground - true if the new frame should become the new active frame.
* If missing, this value will be defaulted to the user's preference (SWITCH_TO_NEW_TABS).
*/
cloneFrame: function (frameProps, guestInstanceId, openInForeground) {
dispatch({
Expand Down
4 changes: 2 additions & 2 deletions js/stores/windowStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,8 @@ const newFrame = (frameOpts, openInForeground, insertionIndex, nextKey) => {
}
frameOpts = frameOpts.toJS ? frameOpts.toJS() : frameOpts

if (openInForeground === undefined) {
openInForeground = true
if (typeof openInForeground !== 'boolean') {
openInForeground = getSetting(settings.SWITCH_TO_NEW_TABS)
}

// evaluate the location
Expand Down