Fix: Avatar preview does not update when same file is selected repeatedly (#8288)
* Fix: Avatar preview does not update when same file is selected repeatedly Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
7600182a35
commit
dbcb56f75e
9 changed files with 48 additions and 3 deletions
|
@ -26,6 +26,7 @@ import Spinner from '../elements/Spinner';
|
|||
import { mediaFromMxc } from "../../../customisations/Media";
|
||||
import RoomAvatar from '../avatars/RoomAvatar';
|
||||
import BaseAvatar from '../avatars/BaseAvatar';
|
||||
import { chromeFileInputFix } from "../../../utils/BrowserWorkarounds";
|
||||
|
||||
interface IProps {
|
||||
initialAvatarUrl?: string;
|
||||
|
@ -182,7 +183,7 @@ export default class ChangeAvatar extends React.Component<IProps, IState> {
|
|||
uploadSection = (
|
||||
<div className={this.props.className}>
|
||||
{ _t("Upload new:") }
|
||||
<input type="file" accept="image/*" onChange={this.onFileSelected} />
|
||||
<input type="file" accept="image/*" onClick={chromeFileInputFix} onChange={this.onFileSelected} />
|
||||
{ this.state.errorText }
|
||||
</div>
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue