mirror of
https://github.com/chinchang/web-maker.git
synced 2025-06-09 19:24:58 +02:00
fix condition for user triggered change in cm change event
This commit is contained in:
parent
e724ed868c
commit
8cc473ed3a
@ -908,9 +908,7 @@ onboardDontShowInTabOptionBtn, TextareaAutoComplete */
|
|||||||
// and in turn too many file writes on a single file (eg. preview.html).
|
// and in turn too many file writes on a single file (eg. preview.html).
|
||||||
if (change.origin !== 'setValue') {
|
if (change.origin !== 'setValue') {
|
||||||
scope.setPreviewContent();
|
scope.setPreviewContent();
|
||||||
}
|
|
||||||
// If this isn a user triggered change, handle unsaved changes count.
|
|
||||||
if (change.origin === '+input' || change.origin === '+delete') {
|
|
||||||
saveBtn.classList.add('is-marked');
|
saveBtn.classList.add('is-marked');
|
||||||
unsavedEditCount += 1;
|
unsavedEditCount += 1;
|
||||||
if (unsavedEditCount % unsavedEditWarningCount === 0 && unsavedEditCount >= unsavedEditWarningCount) {
|
if (unsavedEditCount % unsavedEditWarningCount === 0 && unsavedEditCount >= unsavedEditWarningCount) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user