compose: Fix banners running off the screen.

We introduce a scrollable region, with a simplebar scrollbar.

Fixes: #25115.
This commit is contained in:
Daniil Fadeev
2023-04-21 13:33:13 +04:00
committed by Tim Abbott
parent b9223088f3
commit 980f7df376
6 changed files with 32 additions and 13 deletions

View File

@@ -295,8 +295,11 @@ export function initialize_kitchen_sink_stuff() {
// Ignore wheel events in the compose area which weren't already handled above.
$("#compose").on("wheel", (e) => {
// Except for the stream select dropdown, which still needs scroll events.
if ($(e.target).parents(".dropdown-list-body").length > 0) {
// Except for the stream select dropdown and compose banners, which still needs scroll events.
if (
$(e.target).closest(".dropdown-list-body").length ||
$(e.target).closest("#compose_banners").length
) {
return;
}
e.stopPropagation();