Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Bard: Not able to delete previous line (paragraph) when using backspace preceding a fieldset #1738
Delete the previous line/paragraph with backspace.
Kinda hard to explain! But if I for instance create a fieldset with a quote (or paragraph) under it, and add a new paragraph/item between them, I can't delete the new line with backspace from the last item. Hopefully the gif does a better job explaining!
Bonus: When backspacing from the start of a quote, it deletes the quote AND asks if I want to delete the fieldset (without deleting the new line). In addition clicking "Cancel" in the "Are you sure?" dialog still deletes the quote. (I know the dialog is referring to the fieldset it also is trying to delete.)
Second bonus: When arrowing up from the quote under the fieldset, it skips the new line and goes to the paragraph before the fieldset. I'll stop talking now, the gif will hopefully help clarify things.
However, just so you're aware, this is (mostly) intentional. We've tried to design Bard in such a way that things flow as naturally as possible with keyboard usage.
So when you hit backspace at the start of a paragraph after a set, it will treat the set like it's the previous character in the text and attempt to delete it. (The same thing will happen if you hit delete at the end of a paragraph before a set) Similarly, using the up/down arrow keys at the start/end of a text block will go past a set to the next/previous text block.
The bug you've encountered is that "being at the start of the text block" didn't take into account empty paragraphs. That has been fixed for next release.
I expected the empty line to behave like an empty text line since it looks like a line break / new paragraph and behaves like an empty text line when putting the cursor there (and thus be included in the arrowing up) and not a set (and skipping it like it does now). Does that make sense?
I've also been experiencing this issue, and would add one thing - if I have extra space at the end of a bard field, and i try to delete it by placing my cursor there and hitting delete, it acts as if i've hit the back button in my browser, and takes me to the previous page. The warning asking me if i really want to leave flashes for a second, but it goes back before i'm able to actually say that's what I wanted to do (which it's not).