Attachment Modal: Fix text paste (#3756)
This commit is contained in:
parent
807fe46657
commit
43c9354944
@ -713,7 +713,7 @@
|
|||||||
|
|
||||||
.placeholder-text {
|
.placeholder-text {
|
||||||
top: auto;
|
top: auto;
|
||||||
bottom: 0.875rem;
|
bottom: 1.0625rem;
|
||||||
left: 0.875rem;
|
left: 0.875rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -436,12 +436,12 @@ const Composer: FC<OwnProps & StateProps> = ({
|
|||||||
if (inInputId === editableInputId) {
|
if (inInputId === editableInputId) {
|
||||||
messageInput = document.querySelector<HTMLDivElement>(editableInputCssSelector)!;
|
messageInput = document.querySelector<HTMLDivElement>(editableInputCssSelector)!;
|
||||||
} else {
|
} else {
|
||||||
messageInput = document.getElementById(editableInputId) as HTMLDivElement;
|
messageInput = document.getElementById(inInputId) as HTMLDivElement;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (selection.rangeCount) {
|
if (selection.rangeCount) {
|
||||||
const selectionRange = selection.getRangeAt(0);
|
const selectionRange = selection.getRangeAt(0);
|
||||||
if (isSelectionInsideInput(selectionRange, editableInputId)) {
|
if (isSelectionInsideInput(selectionRange, inInputId)) {
|
||||||
insertHtmlInSelection(newHtml);
|
insertHtmlInSelection(newHtml);
|
||||||
messageInput.dispatchEvent(new Event('input', { bubbles: true }));
|
messageInput.dispatchEvent(new Event('input', { bubbles: true }));
|
||||||
return;
|
return;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user