From 915af30fda19d939b32242927520c07da788d8f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adriana=20Ceri=C4=87?= <62163307+AdrianaCeric@users.noreply.github.com> Date: Thu, 26 Oct 2023 12:11:10 -0400 Subject: [PATCH] fix(TimetableGrid): Prevent last pasted cell being active --- lib/editor/components/timetable/TimetableGrid.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/editor/components/timetable/TimetableGrid.js b/lib/editor/components/timetable/TimetableGrid.js index 54f9f6a1d..a6e751b12 100644 --- a/lib/editor/components/timetable/TimetableGrid.js +++ b/lib/editor/components/timetable/TimetableGrid.js @@ -410,7 +410,10 @@ export default class TimetableGrid extends Component { } } } - setActiveCell(`${activeRow}-${activeCol}`) + // Prevent the active cell from being set to the last cell in the pasted selection + if (activeRow !== rowIndex + pastedRows.length - 1) { + setActiveCell(`${activeRow}-${activeCol}`) + } updateScroll(activeRow, activeCol) }