From 43c9354944d680b551c2c31b9c4e0db336efe38b Mon Sep 17 00:00:00 2001 From: Alexander Zinchuk Date: Mon, 4 Sep 2023 04:04:57 +0200 Subject: [PATCH] Attachment Modal: Fix text paste (#3756) --- src/components/common/Composer.scss | 2 +- src/components/common/Composer.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/common/Composer.scss b/src/components/common/Composer.scss index bfbfdd9cf..607fa1618 100644 --- a/src/components/common/Composer.scss +++ b/src/components/common/Composer.scss @@ -713,7 +713,7 @@ .placeholder-text { top: auto; - bottom: 0.875rem; + bottom: 1.0625rem; left: 0.875rem; } } diff --git a/src/components/common/Composer.tsx b/src/components/common/Composer.tsx index 2a26cb725..b386e3383 100644 --- a/src/components/common/Composer.tsx +++ b/src/components/common/Composer.tsx @@ -436,12 +436,12 @@ const Composer: FC = ({ if (inInputId === editableInputId) { messageInput = document.querySelector(editableInputCssSelector)!; } else { - messageInput = document.getElementById(editableInputId) as HTMLDivElement; + messageInput = document.getElementById(inInputId) as HTMLDivElement; } if (selection.rangeCount) { const selectionRange = selection.getRangeAt(0); - if (isSelectionInsideInput(selectionRange, editableInputId)) { + if (isSelectionInsideInput(selectionRange, inInputId)) { insertHtmlInSelection(newHtml); messageInput.dispatchEvent(new Event('input', { bubbles: true })); return;