Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/files_texteditor.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorSuperSayu <supersayu@gmail.com>2017-09-17 19:25:00 +0300
committerSuperSayu <supersayu@gmail.com>2017-11-06 19:36:45 +0300
commitbe56a2969faeba3d92f5c98c35bcca68c9c2a41c (patch)
treef575c4b44c86cc76a0d8b9bad280d3e06288db56 /js
parent066428e4736919ffe6df5d4e79bb3b149f7f73f2 (diff)
Fix autosave timer
The autosave timer was not functioning properly because the timer was being incorrectly stored, resulting in a save file request for every change in the editor to be sent to the server. Signed-off-by: Vincent Van Laak <supersayu@gmail.com>
Diffstat (limited to 'js')
-rw-r--r--js/editor.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/js/editor.js b/js/editor.js
index 15b7805..4c65458 100644
--- a/js/editor.js
+++ b/js/editor.js
@@ -636,8 +636,8 @@ var Files_Texteditor = {
* Configure the autosave timer
*/
setupAutosave: function() {
- clearTimeout(this.saveTimer);
- this.saveTimer = setTimeout(OCA.Files_Texteditor._onSaveTrigger, 3000);
+ clearTimeout(OCA.Files_Texteditor.saveTimer);
+ OCA.Files_Texteditor.saveTimer = setTimeout(OCA.Files_Texteditor._onSaveTrigger, 3000);
},
/**