nextcloud / nextcloud/tables

Although a rich text field is the first column, it does not get focus when trying to add a new row

Open Beginner friendly
#1,699 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

1. to develop bug
Dominant language
JavaScript
Stars
214
Forks
52
Avg merge
1d 10h
Merged PRs (30d)
82

Description

Steps to reproduce
  1. Have a table with the first column being a rich text one and the second being a selection column with a few options
  2. Click on '+ Create row'
Expected behavior

The rich text editor is being focused

Actual behavior

The selection field is being focused and it appears at the wrong place (apparently rendered to early)

Tables app version

0.9.0

Browser

No response

Client operating system

No response

Operating system

No response

Web server

None

PHP engine version

None

Database

None

Additional info

In src/modules/modals/CreateRow.vue we set the focus only to the first input element:

        showModal() {
            if (this.showModal) {
                this.$nextTick(() => {
                    this.$el.querySelector('input')?.focus()
                })
            }
        },

The editor is a contenteditable div however. This needs extra care.

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 in src/modules/modals/CreateRow.vue, especially showModal(), and reproduce the behavior with a rich text first column and selection second column. Inspect how the contenteditable editor and input are rendered when creating a row. Done means the rich text editor receives focus and the selection field is not focused or rendered in the wrong place.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
62/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.