overleaf/server-ce/hotfix/3.1.1/fix-history-navigation.patch
Miguel Serrano ab4a01f15b Merge pull request #8996 from overleaf/msm-ce-sp-hotfix-3-1-1
[CE/SP] Hotfix 3.1.1

GitOrigin-RevId: f1c3feb17e90f9cd1050b7a2b4ad18e7db9a8ed3
2022-08-04 08:04:18 +00:00

16 lines
No EOL
712 B
Diff

--- services/web/frontend/js/ide/history/controllers/HistoryListController.js
+++ services/web/frontend/js/ide/history/controllers/HistoryListController.js
@@ -62,7 +62,12 @@ App.controller('HistoryListController', function ($scope, $modal, ide) {
return (() => {
const result = []
for (const update of Array.from($scope.history.updates)) {
- let inSelection
+
+ // replacing this declaration with `let` introduces a bug in history point selection:
+ // https://github.com/overleaf/overleaf/issues/1035
+ // eslint-disable-next-line no-var
+ var inSelection
+
if (update.selectedTo) {
inSelection = true
beforeSelection = false