diff options
author | Fatih Acet <acetfatih@gmail.com> | 2018-07-18 01:58:01 +0200 |
---|---|---|
committer | Fatih Acet <acetfatih@gmail.com> | 2018-07-18 12:55:58 +0200 |
commit | 13ede8cfb763888c70447a487722c620c87d2a40 (patch) | |
tree | 59c21ce6624d526780b6ae046dc0697fffa76197 /app/assets/javascripts | |
parent | 3a3c640ef2b90c107fd019d3c0ce199923a5f44e (diff) | |
download | gitlab-ce-13ede8cfb763888c70447a487722c620c87d2a40.tar.gz |
Revert debounce.
Diffstat (limited to 'app/assets/javascripts')
-rw-r--r-- | app/assets/javascripts/autosave.js | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/app/assets/javascripts/autosave.js b/app/assets/javascripts/autosave.js index 32789186020..e8c59fab609 100644 --- a/app/assets/javascripts/autosave.js +++ b/app/assets/javascripts/autosave.js @@ -1,6 +1,5 @@ /* eslint-disable no-param-reassign, prefer-template, no-void, consistent-return */ -import _ from 'underscore'; import AccessorUtilities from './lib/utils/accessor'; export default class Autosave { @@ -14,13 +13,7 @@ export default class Autosave { this.key = 'autosave/' + key; this.field.data('autosave', this); this.restore(); - this.field.on('keyup', this.debounceInputHandler()); - } - - debounceInputHandler() { - return _.debounce(() => { - this.save(); - }, Autosave.DEBOUNCE_TIMER); + this.field.on('input', () => this.save()); } restore() { @@ -64,6 +57,4 @@ export default class Autosave { dispose() { this.field.off('input'); } - - static DEBOUNCE_TIMER = 300; } |