adjust ignored key logic to allow save after ignored keys are pressed after desired keys
This commit is contained in:
parent
58599afd5d
commit
b3cb855316
@ -62,11 +62,11 @@ $(function () {
|
|||||||
// save after a second delay after typing
|
// save after a second delay after typing
|
||||||
$textarea.keyup(function (e) {
|
$textarea.keyup(function (e) {
|
||||||
|
|
||||||
clearTimeout(timer);
|
|
||||||
|
|
||||||
// only set timer if key isn't ignored
|
// only set timer if key isn't ignored
|
||||||
if (!ignoredKeyCodes.includes(e.keyCode)) {
|
if (!ignoredKeyCodes.includes(e.keyCode)) {
|
||||||
|
|
||||||
|
clearTimeout(timer);
|
||||||
|
|
||||||
timer = setTimeout(function () {
|
timer = setTimeout(function () {
|
||||||
saveContent();
|
saveContent();
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user