mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 05:23:35 +00:00
compose: Disable unneeded control buttons in preview mode.
Buttons which change the content in the compose textarea were so far enabled even in preview mode, and would work, but those changes would not be reflected in the visible preview. This is extremely confusing, and can lead to the possibility of a user accidentally changing the content of the compose textarea while previewing, and sending that. Now we disable those buttons in preview mode, both when composing a new message and when editing an existing one. We still show the tooltips, but grey them out and make them unclickable. Fixes: #20962
This commit is contained in:
committed by
Tim Abbott
parent
aaf3369d39
commit
953f026487
@@ -1,16 +1,22 @@
|
||||
<div class="compose_control_buttons_container order-1">
|
||||
<input type="file" class="file_input notvisible" multiple />
|
||||
{{#if file_upload_enabled }}
|
||||
<a role="button" class="compose_control_button compose_upload_file fa fa-paperclip notdisplayed" aria-label="{{t 'Upload files' }}" tabindex=0 data-tippy-content="{{t 'Upload files' }}"></a>
|
||||
<div class="compose_control_button_container preview_mode_disabled" data-tippy-content="{{t 'Upload files' }}">
|
||||
<a role="button" class="compose_control_button compose_upload_file fa fa-paperclip notdisplayed" aria-label="{{t 'Upload files' }}" tabindex=0></a>
|
||||
</div>
|
||||
{{/if}}
|
||||
<a role="button" class="markdown_preview compose_control_button fa fa-eye" aria-label="{{t 'Preview' }}" tabindex=0 data-tippy-content="{{t 'Preview' }}"></a>
|
||||
<a role="button" class="undo_markdown_preview compose_control_button fa fa-edit" aria-label="{{t 'Write' }}" tabindex=0 style="display:none;" data-tippy-content="{{t 'Write' }}"></a>
|
||||
<a role="button" class="compose_control_button fa fa-video-camera video_link" aria-label="{{t 'Add video call' }}" tabindex=0 data-tippy-content="{{t 'Add video call' }}"></a>
|
||||
<div class="compose_control_button_container" data-tippy-content="{{t 'Add emoji' }}">
|
||||
<div class="compose_control_button_container preview_mode_disabled" data-tippy-content="{{t 'Add video call' }}">
|
||||
<a role="button" class="compose_control_button fa fa-video-camera video_link" aria-label="{{t 'Add video call' }}" tabindex=0></a>
|
||||
</div>
|
||||
<div class="compose_control_button_container preview_mode_disabled" data-tippy-content="{{t 'Add emoji' }}">
|
||||
<a role="button" class="compose_control_button fa fa-smile-o emoji_map" aria-label="{{t 'Add emoji' }}" tabindex=0></a>
|
||||
</div>
|
||||
<a role="button" class="compose_control_button fa fa-clock-o time_pick" aria-label="{{t 'Add global time' }}" tabindex=0 data-tooltip-template-id="add-global-time-tooltip" data-tippy-maxWidth="none"></a>
|
||||
<div class="compose_control_button_container {{#unless giphy_enabled }}hide{{/unless}}" data-tippy-content="{{t 'Add GIF' }}">
|
||||
<div class="compose_control_button_container preview_mode_disabled" data-tooltip-template-id="add-global-time-tooltip" data-tippy-maxWidth="none">
|
||||
<a role="button" class="compose_control_button fa fa-clock-o time_pick" aria-label="{{t 'Add global time' }}" tabindex=0></a>
|
||||
</div>
|
||||
<div class="compose_control_button_container {{#unless giphy_enabled }}hide{{/unless}} preview_mode_disabled" data-tippy-content="{{t 'Add GIF' }}">
|
||||
<a role="button" class="compose_control_button compose_gif_icon zulip-icon zulip-icon-gif" aria-label="{{t 'Add GIF' }}" tabindex=0></a>
|
||||
</div>
|
||||
<div class="divider hide-sm">|</div>
|
||||
|
||||
Reference in New Issue
Block a user