upload: Avoid jQuery sizzle extension :visible.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2025-05-20 16:09:24 -07:00
committed by Tim Abbott
parent 4814898ccf
commit c356595ed5
2 changed files with 5 additions and 2 deletions

View File

@@ -217,7 +217,7 @@ export let upload_files = (
// We implement this transition through triggering a click on the
// toggle button to take advantage of the existing plumbing for
// handling the compose and edit UIs.
if (config.markdown_preview_hide_button().is(":visible")) {
if (config.markdown_preview_hide_button().css("display") !== "none") {
config.markdown_preview_hide_button().trigger("click");
}

View File

@@ -229,7 +229,10 @@ test("upload_files", async ({mock_template, override, override_rewire}) => {
});
$("#compose-send-button").removeClass("disabled-message-send-controls");
$("#compose_banners .upload_banner").remove();
$("#compose .undo_markdown_preview").show();
$("#compose .undo_markdown_preview").css = (property) => {
assert.equal(property, "display");
return "flex";
};
banner_shown = false;
mock_template("compose_banner/upload_banner.hbs", false, () => {