diff --git a/Plugins/ImageZoom/ImageZoom.plugin.js b/Plugins/ImageZoom/ImageZoom.plugin.js index 2fa5b81528..c575bb4815 100644 --- a/Plugins/ImageZoom/ImageZoom.plugin.js +++ b/Plugins/ImageZoom/ImageZoom.plugin.js @@ -124,15 +124,17 @@ class ImageZoom { if (methodnames.includes("componentDidMount")) { let modal = BDFDB.getParentEle(BDFDB.dotCN.modal, wrapper); if (!modal) return; + let inner = modal.querySelector(BDFDB.dotCN.modalinner); + if (!inner) return; let start = performance.now(); let waitForImg = setInterval(() => { let img = modal.querySelector(BDFDB.dotCNS.imagewrapper + "img," + BDFDB.dotCNS.imagewrapper + "video"); if (img && img.src) { clearInterval(waitForImg); img.setAttribute("draggable", "false"); - img.parentElement.parentElement.appendChild(BDFDB.htmlToElement(` | `)); + inner.firstElementChild.appendChild(BDFDB.htmlToElement(` | `)); let settingslink = BDFDB.htmlToElement(`Zoom ${BDFDB.LanguageStrings.SETTINGS}`); - img.parentElement.parentElement.appendChild(settingslink); + inner.firstElementChild.appendChild(settingslink); let openContext = e => { let settings = BDFDB.getAllData(this, "settings"); let zoomSettingsContext = BDFDB.htmlToElement(this.zoomSettingsContextMarkup);