1
0
mirror of https://github.com/chinchang/web-maker.git synced 2025-05-29 05:29:13 +02:00

fix condition for user triggered change in cm change event

This commit is contained in:
Kushagra Gour 2017-03-12 01:12:33 +05:30
parent e724ed868c
commit 8cc473ed3a

View File

@ -908,9 +908,7 @@ onboardDontShowInTabOptionBtn, TextareaAutoComplete */
// and in turn too many file writes on a single file (eg. preview.html).
if (change.origin !== 'setValue') {
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');
unsavedEditCount += 1;
if (unsavedEditCount % unsavedEditWarningCount === 0 && unsavedEditCount >= unsavedEditWarningCount) {