odoo/o-spreadsheet#7381
Created by BI, Rémi Rahir (rar)
- label
- odoo:17.0-fix-non-updated-sheet-name-rar
- head
- 099ceddbd0508e743afb70127038ef6af1d6c007
| odoo/o-spreadsheet | |
|---|---|
| 17.0 | #7381 missing r+ |
| 18.0 | |
| saas-18.2 | |
| saas-18.3 | |
| saas-18.4 | |
| 19.0 | |
| master |
[FIX] BottomBarSheet: sheet name should update on foreign changes
How to reproduce:
On Firefox,
- double click the bottom bar to rename a sheet
- Undo the change (button or through Ctrl-Z)
=> the sheetName is not rolled back to its previous value
The issue seems to lie in the fact that in FF, setting a t-esc on an Element that was previously contenteditable=true creates weird behaviour. I suspect some internal state of the div that is not cleared.
On the other hand, changing the contenteditable state of the span element might not be the best idea and one could consider that it's safer to simply regenerate the span altogether when switching editing state.
This commit takes the last suggested approach.
Description:
description of this task, what is implemented and why it is implemented that way.
Task: 5016252
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