File tree Expand file tree Collapse file tree 2 files changed +1
-18
lines changed
Expand file tree Collapse file tree 2 files changed +1
-18
lines changed Original file line number Diff line number Diff line change 2222- Allow showing testcase details on compiler error status
2323- Enhanced integrated view to display compilation output and errors
2424- Made the bubble texts in the UI more compact
25+ - Removed custom caret placing from the textarea because it acts inconsistently with the custom truncated display of IO texts
2526
2627### Fixed
2728
Original file line number Diff line number Diff line change 4040 let containerElement: HTMLDivElement | undefined = $state ();
4141 let actionButtonsElement: HTMLDivElement | undefined = $state ();
4242 let isHovered = $state ();
43- let initialCursorPosition = $state (0 );
4443 let cursorOverlapsActions = $state (false );
4544 let showExpandButton = $state (false );
4645 let showEditButtons = $state (false );
173172
174173 function handleTextareaTransition(event ? : MouseEvent ) {
175174 if (! readonly ) {
176- if (event instanceof MouseEvent && value ) {
177- // caretPositionFromPoint is a VERY new function (December 2025!) so fallback to VSCode's
178- // older caretRangeFromPoint (which is deprecated but still widely supported)
179- if (typeof (document as any ).caretPositionFromPoint === " function" ) {
180- const position = (document as any ).caretPositionFromPoint (event .clientX , event .clientY );
181- initialCursorPosition = position ?.offset ?? value .length ;
182- } else if (typeof document .caretRangeFromPoint === " function" ) {
183- const range = document .caretRangeFromPoint (event .clientX , event .clientY );
184- initialCursorPosition = range ?.startOffset ?? value .length ;
185- } else {
186- initialCursorPosition = value .length ;
187- }
188- } else {
189- initialCursorPosition = value ?.length ?? 0 ;
190- }
191175 editing = true ;
192176 onpreedit ?.();
193177 }
196180 $effect (() => {
197181 if (editing && textarea && document .activeElement !== textarea ) {
198182 textarea .focus ();
199- const pos = Math .min (initialCursorPosition , value ?.length ?? 0 );
200- textarea .setSelectionRange (pos , pos );
201183 }
202184 });
203185
You can’t perform that action at this time.
0 commit comments