mirror of
https://github.com/zulip/zulip.git
synced 2025-11-01 12:33:40 +00:00
compose: Remove old style compose send disable.
We now use `disabled-message-send-controls` class to control
the disabled status of send button. So, this is not required.
(cherry picked from commit ad0b616bbd)
This commit is contained in:
@@ -40,7 +40,6 @@ import * as user_topics from "./user_topics.ts";
|
||||
import * as widget_modal from "./widget_modal.ts";
|
||||
|
||||
export function abort_xhr() {
|
||||
$("#compose-send-button").prop("disabled", false);
|
||||
upload.compose_upload_cancel();
|
||||
}
|
||||
|
||||
|
||||
@@ -718,8 +718,6 @@ export function validate_stream_message_mentions(opts: StreamWildcardOptions): b
|
||||
|
||||
if (!user_acknowledged_stream_wildcard) {
|
||||
show_stream_wildcard_warnings(opts);
|
||||
|
||||
$("#compose-send-button").prop("disabled", false);
|
||||
compose_ui.hide_compose_spinner();
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -155,7 +155,6 @@ function stub_message_row($textarea) {
|
||||
function initialize_pm_pill(mock_template) {
|
||||
$.clear_all_elements();
|
||||
|
||||
$("#compose-send-button").prop("disabled", false);
|
||||
$("#compose-send-button").trigger("focus");
|
||||
$("#compose-send-button .loader").hide();
|
||||
|
||||
@@ -303,7 +302,6 @@ test_ui("validate", ({mock_template, override}) => {
|
||||
};
|
||||
assert.ok(!compose_validate.validate());
|
||||
assert.ok(!$("#compose-send-button .loader").visible());
|
||||
assert.equal($("#compose-send-button").prop("disabled"), false);
|
||||
compose_validate.validate();
|
||||
|
||||
// Now add content to compose, and expect to see the banner.
|
||||
@@ -455,7 +453,6 @@ test_ui("validate_stream_message", ({override, override_rewire, mock_template})
|
||||
override(realm, "realm_can_mention_many_users_group", everyone.id);
|
||||
compose_state.message_content("Hey @**all**");
|
||||
assert.ok(!compose_validate.validate());
|
||||
assert.equal($("#compose-send-button").prop("disabled"), false);
|
||||
assert.ok(stream_wildcard_warning_rendered);
|
||||
|
||||
let wildcards_not_allowed_rendered = false;
|
||||
|
||||
@@ -152,8 +152,6 @@ test("show_error_message", ({mock_template}) => {
|
||||
return "<banner-stub>";
|
||||
});
|
||||
|
||||
$("#compose-send-button").prop("disabled", true);
|
||||
|
||||
upload.show_error_message(upload.compose_config, "Error message");
|
||||
assert.ok(!$("#compose-send-button").hasClass("disabled-message-send-controls"));
|
||||
assert.ok(banner_shown);
|
||||
|
||||
Reference in New Issue
Block a user