Followup of https://github.com/odoo/o-spreadsheet/pull/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.
Task: 3949903
Description:
description of this task, what is implemented and why it is implemented that way.
Followup of https://github.com/odoo/o-spreadsheet/pull/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 containerGridOverlay
. This issue would arise in Firefox and not Chromium-based browser. It to be linked to how the two handle the repositioning ofstatic
elements. This revision addresses this by setting the position ofFigureContainer
to absolute and not static.How to reproduce: On Firefox,
Task: 3949903
Description:
description of this task, what is implemented and why it is implemented that way.
Task: : 3949903
review checklist
Forward-Port-Of: odoo/o-spreadsheet#4404