Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

poll_widget: Use `.prop()` but not `.attr()` for button disabled state.

Junyao Chen789d052116d8
diff --git a/web/src/poll_widget.js b/web/src/poll_widget.js
index 46a945917a7..8c9fd277a0e 100644
--- a/web/src/poll_widget.js
+++ b/web/src/poll_widget.js
@@ -182,12 +182,12 @@ export function activate({
const options = poll_data.get_widget_data().options;
if (poll_data.is_option_present(options, option)) {
- $elem.find("button.poll-option").attr("disabled", true);
+ $elem.find("button.poll-option").prop("disabled", true);
$elem
.find("button.poll-option")
.attr("title", $t({defaultMessage: "Option already present."}));
} else {
- $elem.find("button.poll-option").attr("disabled", false);
+ $elem.find("button.poll-option").prop("disabled", false);
$elem.find("button.poll-option").removeAttr("title");
}
}