[BUG] Cursor placed after closing delimiter when formatting button tapped
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 85/100
Research direction
Start with MarkdownEditorController.wrapSelection(), especially the sel.isCollapsed path, and trace how the formatting toolbar applies the resulting selection. Reproduce the Bold-button case with no selection on the supported platforms, then verify that the cursor lands between the inserted delimiters and that existing selections still behave correctly.
Written by the indexing model from the issue text.
Description
Description
When a formatting button (Bold, Italic, etc.) is tapped with no selection, it inserts delimiter pairs (e.g. ** + **) but places the cursor after the closing delimiter rather than between them. The user has to manually move the cursor back inside the delimiters before typing.
Steps to Reproduce
- Place cursor in empty text or at a position with no selection
- Tap the Bold button in the FormattingToolbar
- Observe cursor position
Expected Behavior
Cursor is placed between the opening and closing delimiters: **|** (where | is the cursor). The user can immediately type formatted text.
Actual Behavior
Cursor is placed after the closing delimiter: ****|.
Environment
- QuKi-Notes version: v0.18.2
- Device: Android, Windows
Possible Solution
In MarkdownEditorController.wrapSelection(), when sel.isCollapsed (no selection), set the resulting cursor offset to sel.start + prefix.length rather than sel.start + prefix.length + suffix.length.
- Dominant language
- Dart
- Stars
- 1
- Forks
- 0
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 11
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ScottKirvan/QuKi-Notes
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
ScottKirvan/QuKi-Notes#388 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
ScottKirvan/QuKi-Notes#382 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
ScottKirvan/QuKi-Notes#235 · 1 comment ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
ScottKirvan/QuKi-Notes#234 · 1 comment ·
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 35/100
ScottKirvan/QuKi-Notes#395 ·
All issues in ScottKirvan/QuKi-Notes
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
code quality good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Suwayomi/Suwayomi-Tsumiru#479 ·
-
Build Failure: agora_rtc_engine compiled against android-31 while dependencies require android-34+ Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 92/100
conceptadev/noir#95 ·