client/posts: implement exit confirmation

This commit is contained in:
rr- 2016-07-30 16:32:50 +02:00
parent 193e34aff8
commit 4b75aab816
2 changed files with 12 additions and 0 deletions

View File

@ -67,6 +67,17 @@ class PostEditSidebarControl extends events.EventTarget {
this._post.addEventListener(
'changeThumbnail', e => this._evtPostThumbnailChange(e));
if (this._formNode) {
const inputNodes = this._formNode.querySelectorAll(
'input, textarea');
for (let node of inputNodes) {
node.addEventListener(
'change', e => {
this.dispatchEvent(new CustomEvent('change'));
});
}
}
}
_evtPostContentChange(e) {

View File

@ -139,6 +139,7 @@ class TagInputControl extends events.EventTarget {
_evtTagsChanged(e) {
this._sourceInputNode.value = this.tags.join(' ');
this._sourceInputNode.dispatchEvent(new CustomEvent('change'));
}
_evtTagAdded(e) {