mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-21 06:10:44 +08:00
Fix autofocus issues on comment components
This commit is contained in:
@@ -41,7 +41,7 @@
|
||||
});
|
||||
|
||||
afterUpdate(() => {
|
||||
if (textareaElement) {
|
||||
if (textareaElement && focus) {
|
||||
textareaElement.setSelectionRange(selectionStart, selectionEnd);
|
||||
textareaElement.focus();
|
||||
}
|
||||
|
||||
@@ -114,6 +114,7 @@
|
||||
<div id={`reply-${root.id}`} class="reply">
|
||||
<CommentToggleInput
|
||||
{rawPath}
|
||||
focus
|
||||
inline
|
||||
placeholder="Reply to comment"
|
||||
on:click={toggleReply}
|
||||
|
||||
@@ -631,6 +631,7 @@
|
||||
{#if threads.length === 0}
|
||||
<div class="connector" />{/if}
|
||||
<CommentToggleInput
|
||||
focus
|
||||
rawPath={rawPath(project.head)}
|
||||
placeholder="Leave your comment"
|
||||
enableAttachments
|
||||
|
||||
@@ -977,6 +977,7 @@
|
||||
<div class="connector" />
|
||||
<CommentToggleInput
|
||||
rawPath={rawPath(patch.revisions[0].id)}
|
||||
focus
|
||||
enableAttachments
|
||||
placeholder="Leave your comment"
|
||||
submit={partial(
|
||||
|
||||
Reference in New Issue
Block a user