mirror of https://github.com/zulip/zulip.git
settings: Allow uploading same image as avatar after deleting.
Previous hack wasn't working but changing the value of file input element to empty works. For more info https://stackoverflow.com/questions/20549241. Fixes: #8377.
This commit is contained in:
parent
118dfb9690
commit
995138d730
|
@ -62,8 +62,7 @@ exports.build_user_avatar_widget = function (upload_function) {
|
|||
$("#user_avatar_delete_button").hide();
|
||||
// Need to clear input because of a small edge case
|
||||
// where you try to upload the same image you just deleted.
|
||||
var file_input = $("#user_avatar_file_input");
|
||||
file_input.replaceWith(file_input.clone(true));
|
||||
get_file_input().val('');
|
||||
},
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue