Fix autofocus issues on comment components

This commit is contained in:
Sebastian Martinez
2024-02-13 05:24:33 +00:00
committed by Rūdolfs Ošiņš
parent 3069198654
commit adb6e06f9e
4 changed files with 4 additions and 1 deletions
+1 -1
View File
@@ -41,7 +41,7 @@
});
afterUpdate(() => {
if (textareaElement) {
if (textareaElement && focus) {
textareaElement.setSelectionRange(selectionStart, selectionEnd);
textareaElement.focus();
}
+1
View File
@@ -114,6 +114,7 @@
<div id={`reply-${root.id}`} class="reply">
<CommentToggleInput
{rawPath}
focus
inline
placeholder="Reply to comment"
on:click={toggleReply}
+1
View File
@@ -631,6 +631,7 @@
{#if threads.length === 0}
<div class="connector" />{/if}
<CommentToggleInput
focus
rawPath={rawPath(project.head)}
placeholder="Leave your comment"
enableAttachments
+1
View File
@@ -977,6 +977,7 @@
<div class="connector" />
<CommentToggleInput
rawPath={rawPath(patch.revisions[0].id)}
focus
enableAttachments
placeholder="Leave your comment"
submit={partial(