diff options
| author | Aya Morisawa <AyaMorisawa4869@gmail.com> | 2019-08-28 02:26:19 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2019-08-28 02:26:19 +0900 |
| commit | 85721065fd1cfedab5aab071064c8cd90a4c4a1e (patch) | |
| tree | ff834caea39b77f3da992283957e9e9efce49cc9 /src/client/app | |
| parent | [MFM] Fallback to js if specified lang is not available (#5347) (diff) | |
| download | sharkey-85721065fd1cfedab5aab071064c8cd90a4c4a1e.tar.gz sharkey-85721065fd1cfedab5aab071064c8cd90a4c4a1e.tar.bz2 sharkey-85721065fd1cfedab5aab071064c8cd90a4c4a1e.zip | |
Save memo automatically (#5351)
* Save memo automatically
* Use clearTimeout
* Clean up
* Clean up
Diffstat (limited to 'src/client/app')
| -rw-r--r-- | src/client/app/common/views/widgets/memo.vue | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/client/app/common/views/widgets/memo.vue b/src/client/app/common/views/widgets/memo.vue index 8a037f03dc..b3b668a9ad 100644 --- a/src/client/app/common/views/widgets/memo.vue +++ b/src/client/app/common/views/widgets/memo.vue @@ -25,7 +25,8 @@ export default define({ data() { return { text: null, - changed: false + changed: false, + timeoutId: null }; }, @@ -45,6 +46,8 @@ export default define({ onChange() { this.changed = true; + clearTimeout(this.timeoutId); + this.timeoutId = setTimeout(this.saveMemo, 1000); }, saveMemo() { |