mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 22:13:26 +00:00
compose: Allow left arrow to scroll buttons.
This commit is contained in:
@@ -148,6 +148,15 @@ function cursor_at_start_of_whitespace_in_compose(): boolean {
|
||||
return message_content() === "" && cursor_position === 0;
|
||||
}
|
||||
|
||||
export function focus_in_formatting_buttons(): boolean {
|
||||
const is_focused_formatting_button =
|
||||
document.activeElement?.classList.contains("compose_control_button");
|
||||
if (is_focused_formatting_button) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
export function focus_in_empty_compose(
|
||||
consider_start_of_whitespace_message_empty = false,
|
||||
): boolean {
|
||||
|
||||
@@ -936,6 +936,9 @@ export function process_hotkey(e, hotkey) {
|
||||
} else if (overlays.streams_open()) {
|
||||
stream_settings_ui.toggle_view(event_name);
|
||||
return true;
|
||||
} else if (compose_state.focus_in_formatting_buttons()) {
|
||||
// Allow left arrow to scroll the formatting buttons backward
|
||||
return false;
|
||||
}
|
||||
|
||||
message_edit.edit_last_sent_message();
|
||||
|
||||
Reference in New Issue
Block a user