Files
zulip/web/templates/topic_edit_form.hbs
Sayam Samal 955ddc011f inline_topic_edit: Make inline topic edit input field width dynamic.
This commit adds a hidden `topic_value_mirror` span element, and uses
that to dynamically set the width of the input field to the width of
the topic text inside it + some cushion.

Fixes #33844.
2025-03-13 15:58:26 -07:00

15 lines
996 B
Handlebars

{{! Client-side Handlebars template for rendering the topic edit form. }}
<form class="topic_edit_form">
<span class="topic_value_mirror hide"></span>
<input type="text" value="" autocomplete="off" maxlength="{{ max_topic_length }}" class="inline_topic_edit header-v"/>
{{#unless is_mandatory_topics}}
<span class="inline-topic-edit-placeholder placeholder">
{{> topic_not_mandatory_placeholder_text empty_string_topic_display_name=empty_string_topic_display_name}}
</span>
{{/unless}}
{{> components/action_button custom_classes="topic_edit_save tippy-zulip-delayed-tooltip" icon="check" attention="quiet" intent="neutral" data-tooltip-template-id="save-button-tooltip-template" }}
{{> components/action_button custom_classes="topic_edit_cancel tippy-zulip-delayed-tooltip" icon="circle-x" attention="borderless" intent="neutral" data-tooltip-template-id="cancel-button-tooltip-template" }}
<div class="topic_edit_spinner"></div>
</form>