mirror of
https://github.com/zulip/zulip.git
synced 2026-06-21 21:32:29 +08:00
modal: Hide, instead of empty, the dialog error element.
Consider a modal with an error element displayed. When a user clicks the submit button, the current behaviour is to empty the element. This empties the inner HTML of the error element, but the CSS makes it still visible, just empty. This looks bad. To avoid this, we hide the element. We use the `ui_report` module to display errors, which adds the `show` class to the error element every time an error is to be displayed. This makes sure that the error element isn't hidden when the user re-clicks the submit button while the modal is still open.
This commit is contained in:
parent
72e5664031
commit
4ccaff6e32
@ -134,7 +134,7 @@ export function launch(conf) {
|
||||
} else if (conf.close_on_submit) {
|
||||
close_modal();
|
||||
}
|
||||
$("#dialog_error").empty();
|
||||
$("#dialog_error").hide();
|
||||
conf.on_click(e);
|
||||
});
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user