ticket title not wrapping
This commit is contained in:
@@ -374,6 +374,9 @@ textarea[data-field="description"]:not(:disabled)::after {
|
||||
line-height: 1.4;
|
||||
min-height: fit-content;
|
||||
height: auto;
|
||||
resize: none;
|
||||
overflow-y: hidden;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
.title-input:not(:disabled) {
|
||||
|
||||
@@ -223,21 +223,36 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
// Show description tab by default
|
||||
showTab('description');
|
||||
|
||||
// Auto-resize function for textareas
|
||||
function autoResizeTextarea(textarea) {
|
||||
// Reset height to auto to get the correct scrollHeight
|
||||
textarea.style.height = 'auto';
|
||||
// Set the height to match the scrollHeight
|
||||
textarea.style.height = textarea.scrollHeight + 'px';
|
||||
}
|
||||
|
||||
// Auto-resize the title textarea to fit content
|
||||
const titleTextarea = document.querySelector('.title-input');
|
||||
if (titleTextarea) {
|
||||
// Initial resize
|
||||
autoResizeTextarea(titleTextarea);
|
||||
|
||||
// Resize on input when in edit mode
|
||||
titleTextarea.addEventListener('input', function() {
|
||||
autoResizeTextarea(this);
|
||||
});
|
||||
}
|
||||
|
||||
// Auto-resize the description textarea to fit content
|
||||
const descriptionTextarea = document.querySelector('textarea[data-field="description"]');
|
||||
if (descriptionTextarea) {
|
||||
function autoResizeTextarea() {
|
||||
// Reset height to auto to get the correct scrollHeight
|
||||
descriptionTextarea.style.height = 'auto';
|
||||
// Set the height to match the scrollHeight
|
||||
descriptionTextarea.style.height = descriptionTextarea.scrollHeight + 'px';
|
||||
}
|
||||
|
||||
// Initial resize
|
||||
autoResizeTextarea();
|
||||
autoResizeTextarea(descriptionTextarea);
|
||||
|
||||
// Resize on input when in edit mode
|
||||
descriptionTextarea.addEventListener('input', autoResizeTextarea);
|
||||
descriptionTextarea.addEventListener('input', function() {
|
||||
autoResizeTextarea(this);
|
||||
});
|
||||
}
|
||||
|
||||
// Initialize assignment handling
|
||||
|
||||
Reference in New Issue
Block a user