odoo/o-spreadsheet#7541

Created by fw-bot
Merged at 8952d1927e48febeaee526121f0652a864a45689

Statuses:

label
odoo:saas-18.3-17.0-fix-non-updated-sheet-name-rar-480498-fw
head
ed7489b3d227a8e1d23f319e909348a044adc332
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