Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit de28d82

Browse files
author
Germain
authored
Add onPaste fallback when getInputableElement returns null (#7540)
1 parent 6444aae commit de28d82

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/structures/LoggedInView.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -385,9 +385,9 @@ class LoggedInView extends React.Component<IProps, IState> {
385385

386386
private onPaste = (ev: ClipboardEvent) => {
387387
const element = ev.target as HTMLElement;
388-
const inputableElement = getInputableElement(element);
388+
const inputableElement = getInputableElement(element) || document.activeElement as HTMLElement;
389389

390-
if (inputableElement) {
390+
if (inputableElement?.focus) {
391391
inputableElement.focus();
392392
} else {
393393
// refocusing during a paste event will make the

0 commit comments

Comments
 (0)