Skip to content

Commit

Permalink
Fixed: Moving tabs to different window and different panel
Browse files Browse the repository at this point in the history
  • Loading branch information
mbnuqw committed Apr 19, 2020
1 parent cd4097d commit 7cfff42
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/sidebar/handlers/tabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -667,14 +667,12 @@ async function onTabAttached(id, info) {
const ai = this.state.attachingTabs.findIndex(t => t.id === id)

let tab
if (ai > -1) {
tab = this.state.attachingTabs.splice(ai, 1)[0]
} else {
tab = await browser.tabs.get(id)
}
if (ai > -1) tab = this.state.attachingTabs.splice(ai, 1)[0]
else tab = await browser.tabs.get(id)

tab.windowId = this.state.windowId
tab.index = info.newPosition
tab.panelId = undefined

this.handlers.onTabCreated(tab)

Expand Down

0 comments on commit 7cfff42

Please sign in to comment.