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:
parent
e724ed868c
commit
8cc473ed3a
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user