odoo/o-spreadsheet#7540

Created by fw-bot
Merged at cb92d82da94e8e2b75240e2f351b4cc2d91a1480

Statuses:

label
odoo:saas-18.2-17.0-fix-non-updated-sheet-name-rar-480497-fw
head
43e3f0d1a5283aa57ce9f3c6216cbd19f57c8248
merged
2 days ago by BI, Pierre Rousseau (pro)
odoo/o-spreadsheet
17.0 #7381
18.0 #7539
saas-18.2 #7540
saas-18.3 #7541
saas-18.4 #7542
19.0 #7543
master #7544

[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.

task-5016252

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

Forward-Port-Of: #7381