Merge pull request #3397 from overleaf/em-out-of-sync

Reload page when dismissing out-of-sync modal

GitOrigin-RevId: cfb164a57969aa294bdbffb18f51077896529bed
This commit is contained in:
Eric Mc Sween
2020-11-19 03:04:35 +00:00
committed by Copybot
parent d0b624d419
commit cb9b44141c
+8 -2
View File
@@ -87,6 +87,8 @@ App.factory('ide', function($http, queuedHttp, $modal, $q, $filter, $timeout) {
$modal.open({
templateUrl: 'outOfSyncModalTemplate',
controller: 'OutOfSyncModalController',
backdrop: false, // not dismissable by clicking background
keyboard: false, // prevent dismiss via keyboard
resolve: {
title() {
return title
@@ -136,7 +138,7 @@ App.controller('GenericMessageModalController', function(
App.controller('OutOfSyncModalController', function(
$scope,
$modalInstance,
$window,
title,
message,
editorContent
@@ -145,7 +147,11 @@ App.controller('OutOfSyncModalController', function(
$scope.message = message
$scope.editorContent = editorContent
return ($scope.done = () => $modalInstance.close())
$scope.done = () => {
// Reload the page to avoid staying in an inconsistent state.
// https://github.com/overleaf/issues/issues/3694
$window.location.reload()
}
})
function __guard__(value, transform) {