From f558f05d6929d66b644e621a1c02bcafe3ecf5dc Mon Sep 17 00:00:00 2001 From: Ben Gotow Date: Tue, 8 Nov 2016 11:54:19 -0800 Subject: [PATCH] fix(image-editing): Fix selector for finding --- .../composer/lib/inline-image-upload-container.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal_packages/composer/lib/inline-image-upload-container.jsx b/internal_packages/composer/lib/inline-image-upload-container.jsx index 3e5818fa0..408966095 100644 --- a/internal_packages/composer/lib/inline-image-upload-container.jsx +++ b/internal_packages/composer/lib/inline-image-upload-container.jsx @@ -42,7 +42,7 @@ export default class InlineImageUploadContainer extends Component { editorEl.appendChild(editorCanvas); const editorCtx = editorCanvas.getContext("2d"); - editorCtx.drawImage(el.querySelector('img.upload'), 0, 0, editorCanvas.width, editorCanvas.height); + editorCtx.drawImage(el.querySelector('.file-preview img'), 0, 0, editorCanvas.width, editorCanvas.height); editorCtx.strokeStyle = "#df4b26"; editorCtx.lineJoin = "round"; editorCtx.lineWidth = 3 * window.devicePixelRatio; @@ -100,7 +100,7 @@ export default class InlineImageUploadContainer extends Component { NylasEnv.showErrorDialog(err.toString()) return; } - const img = el.querySelector('img.upload'); + const img = el.querySelector('.file-preview img'); img.style.width = `${rect.width}px`; img.style.height = `${rect.height}px`; img.src = `${img.src}?${Date.now()}`;