mirror of
https://github.com/zulip/zulip.git
synced 2025-11-12 09:58:06 +00:00
compose: Disable send button with a default cursor.
This commit is a pre commit to a change that will introduce banners and tooltips as per various unmet conditions while composing a message. To accomodate future changes, the toggling is switched to conditional addition/removal of the `disabled-message-send-controls` class while updating the status of the send button. Also a default cursor is added and the send area tooltips are disabled whenever the `disabled-message-send-controls` class is present.
This commit is contained in:
committed by
Tim Abbott
parent
6a443c0418
commit
4b82e08b13
@@ -215,8 +215,11 @@ export function initialize(): void {
|
|||||||
trigger: "mouseenter",
|
trigger: "mouseenter",
|
||||||
appendTo: () => document.body,
|
appendTo: () => document.body,
|
||||||
onShow(instance) {
|
onShow(instance) {
|
||||||
// Don't show Send button tooltip if the popover is displayed.
|
// Don't show send-area tooltips if the popover is displayed or if the send button is disabled.
|
||||||
if (popover_menus.is_scheduled_messages_popover_displayed()) {
|
if (
|
||||||
|
popover_menus.is_scheduled_messages_popover_displayed() ||
|
||||||
|
$(".message-send-controls").hasClass("disabled-message-send-controls")
|
||||||
|
) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (user_settings.enter_sends) {
|
if (user_settings.enter_sends) {
|
||||||
|
|||||||
@@ -1410,7 +1410,7 @@ textarea.new_message_textarea {
|
|||||||
|
|
||||||
&.disabled-message-send-controls {
|
&.disabled-message-send-controls {
|
||||||
& button {
|
& button {
|
||||||
pointer-events: none;
|
cursor: default;
|
||||||
opacity: 0.5;
|
opacity: 0.5;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user