Skip to content

Commit

Permalink
Set selectionStart and selectionEnd correctly
Browse files Browse the repository at this point in the history
Instead of defaulting to 0, we should put the selection always at the
end of the comment, else drag and dropping anything would insert it at
the very beginning
  • Loading branch information
sebastinez committed Dec 12, 2024
1 parent c2ec2dd commit ba2cf07
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/ExtendedTextarea.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@
/* eslint-enable prefer-const */
let preview: boolean = $state(false);
let selectionStart = $state(0);
let selectionEnd = $state(0);
let selectionStart = $state(body.length);
let selectionEnd = $state(body.length);
let draggingOver = $state(false);
let dragEnterUnlistenFn: UnlistenFn | undefined = undefined;
let dragLeaveUnlistenFn: UnlistenFn | undefined = undefined;
Expand Down

0 comments on commit ba2cf07

Please sign in to comment.