compose: Fix buggy tooltip hotkey hint placement in compose send button.

This commit eliminates a bug, introduced in commit
7bc04bb829, where the send button's
tooltip hotkey hint would have incorrect placement when the user had
triggered a tippy instance on the send button while it was disabled.

The reason behind this bug was the conflict between code in the
previously mentioned commit which set the tooltip content to
`display: block` to account for the inline italicized empty topic name
in the error message, and the need for `display: flex` to ensure the
hotkey hint was positioned correctly.
This commit is contained in:
Sayam Samal
2025-07-08 09:05:58 +05:30
committed by Tim Abbott
parent ea48a283b1
commit 1c58dcddfa
3 changed files with 13 additions and 10 deletions

View File

@@ -270,9 +270,6 @@ export function initialize(): void {
if (instance.reference.classList.contains("disabled-message-send-controls")) {
const error_message = compose_validate.get_disabled_send_tooltip_html();
instance.setContent(parse_html(error_message));
// `display: flex` doesn't show the tooltip content inline when <i>general chat</i>
// is in the error message.
$(instance.popper).find(".tippy-content").css("display", "block");
if (!error_message) {
blueslip.error("Compose send button incorrectly disabled.");