odoo/o-spreadsheet#4571
Created by fw-bot
Statuses:
- label
- odoo:saas-17.1-17.0-fix-paste-chart-rar-TnIc-fw
- head
- 142c40b2f4ec283e9fa9383877583c1ffb0f5477
- merged
- 3 months ago by BI, Lucas Lefèvre (lul)
odoo/o-spreadsheet | |
---|---|
17.0 | #4404 |
saas-17.1 | #4571 |
saas-17.2 | #4573 |
saas-17.3 | #4574 |
master | #4575 |
[FW][FIX] grid: prevent paste default
Followup of #4298 The issue of the replacement of DOM elements still occured when we'd paste a chart is a specific way (see #How to reproduce). This commit ensures that the default paste behaviour is prevented when the lib has a custom handler, not just through the composer.
In this case, it is FigureContainer
that is affected. After the paste effect, it replaces itself outside the visible part of its container GridOverlay
. This issue would arise in Firefox and not Chromium-based browser. It to be linked to how the two handle the repositioning of static
elements. This revision addresses this by setting the position of FigureContainer
to absolute and not static.
How to reproduce:
On Firefox,
- select a chart and open its sidepanel
- cut it (Ctrl-x)
- Focus a selectionInput in the sidepanel
- click on the grid to update the selectionInput
- immediatly paste the chart (Ctrl-v) -> the page layout is broken. On the demo spreadsheet, the charts all disappeared and the "Add rows" button is visible even if the bottom of the grid is way below the viewport.
Description:
description of this task, what is implemented and why it is implemented that way.
Task: : 3949903
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: #4404