Little fixes to note editor:
- Fix invalid selector - Filter itself sent postMessage messages
This commit is contained in:
parent
6a6e4fa92c
commit
aa11c36a64
1 changed files with 3 additions and 2 deletions
|
@ -522,7 +522,7 @@ class EditorInstance {
|
|||
}
|
||||
});
|
||||
|
||||
let node = doc.querySelector(`img[data-attachment-key=${attachment.key}]`);
|
||||
let node = doc.querySelector(`img[data-attachment-key="${attachment.key}"]`);
|
||||
if (node) {
|
||||
node.setAttribute('data-attachment-key', clonedAttachment.key);
|
||||
}
|
||||
|
@ -535,7 +535,8 @@ class EditorInstance {
|
|||
}
|
||||
|
||||
_messageHandler = async (e) => {
|
||||
if (e.data.instanceID !== this.instanceID) {
|
||||
if (e.source !== this._iframeWindow
|
||||
|| e.data.instanceID !== this.instanceID) {
|
||||
return;
|
||||
}
|
||||
let message = e.data.message;
|
||||
|
|
Loading…
Reference in a new issue