compose: Show or hide scrolling buttons on scroll event.

Fixes: #31215
This commit is contained in:
Karl Stolley
2025-01-09 13:15:30 -06:00
committed by Tim Abbott
parent c6bdebec03
commit dcb7acfde3
3 changed files with 43 additions and 0 deletions

View File

@@ -1,4 +1,5 @@
import $ from "jquery";
import _ from "lodash";
import {unresolve_name} from "../shared/src/resolved_topic.ts";
import render_add_poll_modal from "../templates/add_poll_modal.hbs";
@@ -508,6 +509,13 @@ export function initialize() {
}
});
$(".compose-scrollable-buttons").on(
"scroll",
_.throttle((e) => {
compose_ui.handle_scrolling_formatting_buttons(e);
}, 150),
);
$("#compose_recipient_box").on("click", "#recipient_box_clear_topic_button", () => {
const $input = $("input#stream_message_recipient_topic");
$input.val("");