Commit ebb8c95
committed
[FIX] full_screen_chart: prevent fullscreen chart from closing on drag-out
Steps to reproduce:
1. Open a dashboard and put a chart in fullscreen.
2. mousedown inside the chart.
3. Drag the pointer outside the chart window.
4. Release (mouseup).
Before this commit:
The fullscreen closes unexpectedly. Because mousedown and mouseup
occur on different elements, the browser dispatches the click on their
nearest common ancestor (the overlay), which had the close handler.
After this commit:
- Introduce a dedicated `.o-fullscreen-chart-backdrop` sibling and move
the close handler there.
- Result: drag-out (down in chart, up outside) no longer closes; outside
click (down+up on backdrop), Exit button, and `Esc` still close as expected.
closes #6991
Task: 5005933
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>1 parent 1ee2018 commit ebb8c95
File tree
3 files changed
+41
-6
lines changed- src/components/full_screen_chart
- tests
- figures/chart
- test_helpers
3 files changed
+41
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
7 | 9 | | |
8 | 10 | | |
9 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
4 | 10 | | |
5 | 11 | | |
6 | 12 | | |
| |||
47 | 53 | | |
48 | 54 | | |
49 | 55 | | |
50 | | - | |
| 56 | + | |
51 | 57 | | |
52 | 58 | | |
53 | 59 | | |
| |||
62 | 68 | | |
63 | 69 | | |
64 | 70 | | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
65 | 93 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
124 | 129 | | |
125 | 130 | | |
126 | 131 | | |
| |||
0 commit comments