client/posts: implement exit confirmation
This commit is contained in:
parent
193e34aff8
commit
4b75aab816
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue