From 9b81bcbe94535731124ab59d422a7c5516d4441d Mon Sep 17 00:00:00 2001 From: Cezar Augusto Date: Tue, 16 May 2017 13:40:54 -0300 Subject: [PATCH 1/2] Fix dnd tab reordering issue Auditors: @bsclifton Fix #8887 --- js/stores/windowStore.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/stores/windowStore.js b/js/stores/windowStore.js index 6a3741023e..eed1f6d933 100644 --- a/js/stores/windowStore.js +++ b/js/stores/windowStore.js @@ -388,7 +388,7 @@ const doAction = (action) => { { const sourceFrameProps = frameStateUtil.getFrameByKey(windowState, action.sourceFrameKey) const sourceFrameIndex = frameStateUtil.getFrameIndex(windowState, action.sourceFrameKey) - let newIndex = frameStateUtil.getFrameIndex(windowState, action.destinationFrameProps.get('key')) + (action.prepend ? 0 : 1) + let newIndex = frameStateUtil.getFrameIndex(windowState, action.destinationFrameProps) + (action.prepend ? 0 : 1) let frames = frameStateUtil.getFrames(windowState).splice(sourceFrameIndex, 1) if (newIndex > sourceFrameIndex) { newIndex-- From b93729e7760143e4e6a3daa72f088df21a590560 Mon Sep 17 00:00:00 2001 From: Brian Clifton Date: Tue, 16 May 2017 10:03:07 -0700 Subject: [PATCH 2/2] Fix error which happens during tab drag and drop Auditors: @cezaraugusto, @NejcZdovc --- js/stores/windowStore.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/stores/windowStore.js b/js/stores/windowStore.js index eed1f6d933..a33ec48f5f 100644 --- a/js/stores/windowStore.js +++ b/js/stores/windowStore.js @@ -388,7 +388,7 @@ const doAction = (action) => { { const sourceFrameProps = frameStateUtil.getFrameByKey(windowState, action.sourceFrameKey) const sourceFrameIndex = frameStateUtil.getFrameIndex(windowState, action.sourceFrameKey) - let newIndex = frameStateUtil.getFrameIndex(windowState, action.destinationFrameProps) + (action.prepend ? 0 : 1) + let newIndex = frameStateUtil.getFrameIndex(windowState, action.destinationFrameKey) + (action.prepend ? 0 : 1) let frames = frameStateUtil.getFrames(windowState).splice(sourceFrameIndex, 1) if (newIndex > sourceFrameIndex) { newIndex--