mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
fix unnecessary change events, closes #118
This commit is contained in:
parent
74202d67bb
commit
c1b245c8b1
@ -11,7 +11,13 @@ async function show() {
|
|||||||
|
|
||||||
textEditor = await BalloonEditor.create($noteDetailText[0], {});
|
textEditor = await BalloonEditor.create($noteDetailText[0], {});
|
||||||
|
|
||||||
textEditor.model.document.on('change', noteDetailService.noteChanged);
|
textEditor.model.document.on('change', () => {
|
||||||
|
// change is triggered on just marker/selection changes which is not interesting for us
|
||||||
|
if (textEditor.model.document.differ.getChanges().length > 0) {
|
||||||
|
noteDetailService.noteChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
textEditor.setData(noteDetailService.getCurrentNote().content);
|
textEditor.setData(noteDetailService.getCurrentNote().content);
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
background-color: #f1f1f1;
|
background-color: #f1f1f1;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 6px 6px 4px;
|
padding: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#note-detail-wrapper {
|
#note-detail-wrapper {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user