Skip to content

Commit

Permalink
Fixed a minor bug in the drag and drop of tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
Bill13579 committed Apr 26, 2018
1 parent b57980d commit eeb4eab
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/popup/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,8 @@ function windowEntryDraggingOver(e) {
e.target.parentElement.insertBefore(cursor, e.target);
}
} else if ((windowEntry = e.target.parentElement) !== null) {
if (windowEntry.classList.contains("window-entry")) {
if (windowEntry.classList.contains("window-entry")
&& !sourceTab.classList.contains("pinned-tab")) {
if (sourceWindow !== windowEntry) {
e.target.classList.add("insert-cursor-window");
}
Expand Down Expand Up @@ -539,7 +540,8 @@ function windowEntryDropped(e) {
}
}
} else if ((windowEntry = e.target.parentElement) !== null) {
if (windowEntry.classList.contains("window-entry")) {
if (windowEntry.classList.contains("window-entry")
&& !sourceTab.classList.contains("pinned-tab")) {
if (sourceWindow !== e.target) {
let sourceTabId = parseInt(sourceTab.getAttribute("data-tab_id"));
let destinationWindowId = windowEntry.getAttribute("data-window_id");
Expand Down

0 comments on commit eeb4eab

Please sign in to comment.