Skip to content

Rich-string field bugs/quircks #1699

Description

@myieye

After playing with our rich-text field, I found quite a few bad and/or bothersome bugs/quircks.

This is a fairly long list.
It would probably be smart to migrate from nodes to marks and remove our custom Delete and Backspace handlers before tackling this, because I would expect some of these issues to just go away.

Can't clear See #1711

If there's text in a rich-string field and you empty it and tab away, it gets re-added

First character ends up as last

When a rich-string field is empty (or probably if there are 0 spans, but I can't test that due to ☝), when you type, after the first character, the cursor jumps to the beginning again. So, the first typed character ends up at the end.

Can't always use backspace if clicking in at end

  1. Add something at the end
  2. Click out (i.e. blur, but without using forward Tab 🙃)
  3. Click in at the end
  4. Backspace doesn't work

"Delete" deletes whole span

  1. Change the value (i.e. type something)
  2. Tab
  3. Reverse-tab
  4. Cursor jumps to beginning of field
  5. Push delete 💥 everything is gone (or maybe just the first span)

Tabbing in behaves differently than normal inputs

Tabbing into a rich-text field tends to put the cursor at the beginning of the field instead of selecting all the text like happens on a normal input.
An exception: if you tab out of a rich-text field and then reverse-tab back in, the cursor lands where it was before.

Other potential improvements

It's very distracting that the text is always underlined.
We also having horizontal spacing between spans, which would look weird if it was in the middle of a word and be redundant if the span edges line up with explicit word spacing.

Idea:

  • Remove spacing
  • Only underline spans that have extra/non-default props ("non-default", because every span/run has a ws, which is only interesting if it doesn't match the field's ws)

That would hopefully result in:

  1. Almost no underlines
  2. Still being able to distinguish between spans, because spans with props are probably rarely next to spans with different props

Metadata

Metadata

Assignees

No one assigned

    Labels

    UI Designowner: TimbugSomething isn't working💻 FW Liteissues related to the fw lite application, not miniLcm or crdt related

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions