Converting a selection to a bulleted or numbered list results in adding an extra row to the list #4813
Comments
|
I can't reproduce this issue. But it looks like maybe you have started your selection on the fourth line? So if you dragged up from the beginning of the fourth line, or started your cursor on the fourth line this is the expected behaviour. |
|
Thanks for responding! I normally select a row by holding shift + down arrow from the first char in Line 1 (i.e. press down arrow 3x) . The cursor disappears and it looks like only Line 1, 2 and 3 are selected. However, if I either:
then: there is no issue - only the first 3 lines are bulleted as expected. |
|
Hey, first timer here - based on what you described @dlampa could it be due to the cursor position? Using your approach, the cursor ends up on the 4th line (even though the line isn't fully highlighted) so that could be why that line ends up bulleted as well. With the other approaches, the cursor doesn't reach line 4. Not sure if that's expected behavior or not, just an observation! |
|
Thank you for taking the time to check this out @unserh - I suppose it's most likely an issue specific to my setup, since the cursor becomes invisible as soon as I make a text selection of any kind, which is probably what led to the confusion in the first place. I agree that if cursor was in Line 4 the behaviour would make complete sense. @CalebJohn Not sure if the invisible cursor on selection is normal? |
|
@dlampa I think we should probably do the same. |
|
@CalebJohn Appreciate you taking the time to look into this further! I've also tried the same on LibreOffice Writer and Apple Pages. Unfortunately I don't have access to Word to check it's behaviour. In Writer, the cursor blinks at the beginning of the last line and behaves identically to Joplin (adding a list item includes the last line automatically - but you can see the cursor so it's expected/implied). Apple Pages behaves like GDocs - cursor disappears on selection, and the last line is ignored when inserting list items. |
with such a clear guidance, I would certainly like to try solving this issue. |
|
I have added a pull request for this issue. |
Environment
Joplin version: 1.7.11
Platform: Linux
OS specifics: Ubuntu 20.04 LTS
Steps to reproduce
After selecting a block of text (see screenshot) and clicking the "Bulleted list" button in the toolbar, an additional
-bullet item is added to the row immediately below the selection:(selected 3 rows)

After converting to a bulleted list (selection was extended automatically by the editor):

Describe what you expected to happen
Only convert the selected rows to a bulleted list.
Note that the same issue occurs when converting a selection to a Numbered List.
Changing the font appearance (i.e. Bold/Italic) works as expected - changes are only applied to selection.
Logfile
The text was updated successfully, but these errors were encountered: