odoo/o-spreadsheet#8844
Created by BI, Rémi Rahir (rar)
- label
- odoo:master-fix-focus-loss-rar
- head
- 213e6a83eab915bb03af9eb249335e5bbcfba821
| odoo/o-spreadsheet | |
|---|---|
| master | #8844 missing r+ |
[FIX] Figure: only focus when the selected figure changes
The condition of the useEffect to re-focus a figure were removed by mistake. This meant that every render, if there was a selected figure, its DOM element would be automatically focus.
There was a race condition with the component SelectionInput that sometimes let the latter have the focus, sometimes not, which lead to the weird behaviour described in the task:
- Insert a scorecard
- Add a key value
- Edit the key value and select it
- Hit backspace twice
=> The first press deletes the value, the second deletes the chart
Description:
description of this task, what is implemented and why it is implemented that way.
Task: TASK_ID
review checklist
- [ ] feature is organized in plugin, or UI components
- [ ] support of duplicate sheet (deep copy)
- [ ] in model/core: ranges are Range object, and can be adapted (adaptRanges)
- [ ] in model/UI: ranges are strings (to show the user)
- [ ] undo-able commands (uses this.history.update)
- [ ] multiuser-able commands (has inverse commands and transformations where needed)
- [ ] new/updated/removed commands are documented
- [ ] exportable in excel
- [ ] translations (_t("qmsdf %s", abc))
- [ ] unit tested
- [ ] clean commented code
- [ ] track breaking changes
- [ ] doc is rebuild (npm run doc)
- [ ] status is correct in Odoo