Although a rich text field is the first column, it does not get focus when trying to add a new row
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 214
- Forks
- 52
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 82
Description
Steps to reproduce
- Have a table with the first column being a rich text one and the second being a selection column with a few options
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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