You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-01 13:11:10 +03:00
Add onPaste fallback when getInputableElement returns null (#7540)
This commit is contained in:
@@ -385,9 +385,9 @@ class LoggedInView extends React.Component<IProps, IState> {
|
||||
|
||||
private onPaste = (ev: ClipboardEvent) => {
|
||||
const element = ev.target as HTMLElement;
|
||||
const inputableElement = getInputableElement(element);
|
||||
const inputableElement = getInputableElement(element) || document.activeElement as HTMLElement;
|
||||
|
||||
if (inputableElement) {
|
||||
if (inputableElement?.focus) {
|
||||
inputableElement.focus();
|
||||
} else {
|
||||
// refocusing during a paste event will make the
|
||||
|
||||
Reference in New Issue
Block a user