nextcloud / nextcloud/text

Can not insert text before Mention

Open
#3,111 5 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

1. to develop 25 feedback bug high javascript upstream ux
Dominant language
JavaScript
Stars
659
Forks
133
Avg merge
1d 20h
Merged PRs (30d)
110

Description

Describe the bug
The cursor can not move before a mention in Firefox, so if the first thing inside a document is a user mention, then you can not add anything before it.

This is a known bug in Firefox when a contenteditable=false element is the first child of a contenteditable=true. See upstream bug report https://bugzilla.mozilla.org/show_bug.cgi?id=1796943.

To Reproduce
Steps to reproduce the behavior:

  1. Open empty file
  2. Add a mention
  3. Try to add something in front of the mention

Expected behavior
Cursor can move before the mention.

Client details:

  • OS: Linux
  • Browser: Firefox
  • Version: master
  • Device: desktop

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue in Firefox with an empty document and a first user mention, then inspect the editor's mention and contenteditable handling. Done means the cursor can be placed before a first mention and text can be inserted there without breaking mention behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.