Fix unfocused paste handling and focus return for file uploads (#7625)
This commit is contained in:
parent
e53427fce3
commit
88cd2f8af7
4 changed files with 39 additions and 16 deletions
|
@ -160,7 +160,11 @@ class UploadButton extends React.Component<IUploadButtonProps> {
|
|||
}
|
||||
|
||||
ContentMessages.sharedInstance().sendContentListToRoom(
|
||||
tfiles, this.props.roomId, this.props.relation, MatrixClientPeg.get(),
|
||||
tfiles,
|
||||
this.props.roomId,
|
||||
this.props.relation,
|
||||
MatrixClientPeg.get(),
|
||||
this.context.timelineRenderingType,
|
||||
);
|
||||
|
||||
// This is the onChange handler for a file form control, but we're
|
||||
|
|
|
@ -560,7 +560,11 @@ export class SendMessageComposer extends React.Component<ISendMessageComposerPro
|
|||
// it puts the filename in as text/plain which we want to ignore.
|
||||
if (clipboardData.files.length && !clipboardData.types.includes("text/rtf")) {
|
||||
ContentMessages.sharedInstance().sendContentListToRoom(
|
||||
Array.from(clipboardData.files), this.props.room.roomId, this.props.relation, this.props.mxClient,
|
||||
Array.from(clipboardData.files),
|
||||
this.props.room.roomId,
|
||||
this.props.relation,
|
||||
this.props.mxClient,
|
||||
this.context.timelineRenderingType,
|
||||
);
|
||||
return true; // to skip internal onPaste handler
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue