mirror of
https://github.com/zulip/zulip.git
synced 2025-11-16 03:41:58 +00:00
realm logo: Fix realm logo unsupported file upload bug.
Unable to upload a realm logo once we encounter file input error bug
was fixed by clearing `get_file_input()` after file input error
with `get_file_input().val('')`.
The previous .clone() logic was preserved over many years but
apparently was also just wrong.
Fixes #15198
This commit is contained in:
@@ -136,8 +136,7 @@ exports.build_direct_upload_widget = function (
|
|||||||
|
|
||||||
function clear() {
|
function clear() {
|
||||||
const control = get_file_input();
|
const control = get_file_input();
|
||||||
const new_control = control.clone(true);
|
control.val('');
|
||||||
control.replaceWith(new_control);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
upload_button.on('drop', function (e) {
|
upload_button.on('drop', function (e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user