Skip to content

Commit

Permalink
Update Iframe
Browse files Browse the repository at this point in the history
  • Loading branch information
karthick-murugan committed Nov 11, 2024
1 parent 154c273 commit 52341d1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/editor/src/components/collab-sidebar/comments.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,12 @@ export function Comments( {

if ( block ) {
const blockClientId = block.clientId;
const blockElement = document.getElementById(
const iframe = document.querySelector(
'iframe[name="editor-canvas"]'
);
const iframeDocument =
iframe.contentDocument || iframe.contentWindow.document;
const blockElement = iframeDocument.getElementById(
'block-' + blockClientId
);

Expand Down

0 comments on commit 52341d1

Please sign in to comment.