Skip to content

Commit

Permalink
fix(TimetableGrid): Prevent last pasted cell being active
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianaCeric committed Oct 26, 2023
1 parent f70c6f3 commit 915af30
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/editor/components/timetable/TimetableGrid.js
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,10 @@ export default class TimetableGrid extends Component<Props> {
}
}
}
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)
}

Expand Down

0 comments on commit 915af30

Please sign in to comment.