Skip to content

NcRichContenteditable: Unable to navigate to start/end of content containing NcMentionBubble on Firefox #6022

@edward-ly

Description

@edward-ly

First reported in nextcloud/server#35296 (which was itself a repost of nextcloud/server#35187 (review)), but after some testing, I believe this is more of a components issue rather than strictly a server issue (but you can correct me if I'm wrong).

Steps to reproduce

  1. Open https://nextcloud-vue-components.netlify.app/#/Components/NcRichContenteditable in Firefox.
  2. In either of the example boxes provided (doesn't matter which one), do the following steps:

Case 1

  1. Append a mention @Test01 after the example sentence.
  2. Press Backspace to remove the space after the mention.
  3. Press Left to move the cursor to the left of the mention.
  4. Press Right.

Expected: the cursor should be directly to the right of the mention.
Actual: the cursor remains in place.

  1. In the other example box, click anywhere in the whitespace to the right to place the cursor at the end.
  2. Press Backspace to remove the space after the mention.

Expected: the cursor should be directly to the right of the mention.
Actual: the cursor disappears entirely.

The same also happens when you click in the whitespace again to try to place the cursor that way. This is the worst case as the mention can no longer be edited in this state (unless you undo with Ctrl-Z, but that's only if a previous state is available which may not always be the case).

Case 2

  1. Delete the example sentence and replace it with a mention @Test01.
  2. Press Backspace to remove the space after the mention.
  3. Press Left.

Expected: the cursor should be directly to the left of the mention.
Actual: the cursor remains in place.

  1. Click in the whitespace to the left of the mention.

Expected: the cursor should be directly to the left of the mention.
Actual: the cursor disappears entirely.

  1. In the other example box, click anywhere in the whitespace to the right to place the cursor at the end.
  2. Press Backspace to remove the space after the mention.

Expected: the cursor should be directly to the right of the mention.
Actual: the cursor disappears entirely, and the content is now un-editable (as above).

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions