diff --git a/src/public/javascripts/services/note_detail_image.js b/src/public/javascripts/services/note_detail_image.js index ea5a1d46f..ab67a468c 100644 --- a/src/public/javascripts/services/note_detail_image.js +++ b/src/public/javascripts/services/note_detail_image.js @@ -5,6 +5,7 @@ import infoService from "./info.js"; import server from "./server.js"; const $component = $('#note-detail-image'); +const $imageWrapper = $('#note-detail-image-wrapper'); const $imageView = $('#note-detail-image-view'); const $imageDownloadButton = $("#image-download"); @@ -39,10 +40,10 @@ function selectImage(element) { } $copyToClipboardButton.click(() => { - $component.attr('contenteditable','true'); + $imageWrapper.attr('contenteditable','true'); try { - selectImage($component.get(0)); + selectImage($imageWrapper.get(0)); const success = document.execCommand('copy'); @@ -55,7 +56,7 @@ $copyToClipboardButton.click(() => { } finally { window.getSelection().removeAllRanges(); - $component.removeAttr('contenteditable'); + $imageWrapper.removeAttr('contenteditable'); } }); diff --git a/src/views/details/image.ejs b/src/views/details/image.ejs index f2792698f..68862109f 100644 --- a/src/views/details/image.ejs +++ b/src/views/details/image.ejs @@ -22,5 +22,7 @@

- +
+ +
\ No newline at end of file