fix-history-navigation.patch 712 B

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