Commit f47b306
committed
[FIX] web_editor: show a default selection in collaboration
Before this commit, whenever a peer had no selection in the editor, no
selection would appear to the other collaborators. It was therefore
visually impossible to know excaltly to how many people someone is
connected.
Now, we set the default selection to be in the first node of the
document.
Additionnaly, some selection were not displayed because the call to
`getClientRects` did not return any rect. By creating a deep range
through the use of `getDeepestPosition`, we ensure to retrieve the
selection rect.
task-3217719
closes odoo#114481
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Nicolas Bayet <nby@odoo.com>1 parent 8396878 commit f47b306
File tree
1 file changed
+26
-13
lines changed- addons/web_editor/static/src/js/editor/odoo-editor/src
1 file changed
+26
-13
lines changedLines changed: 26 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| 75 | + | |
75 | 76 | | |
76 | 77 | | |
77 | 78 | | |
| |||
1562 | 1563 | | |
1563 | 1564 | | |
1564 | 1565 | | |
1565 | | - | |
1566 | | - | |
| 1566 | + | |
| 1567 | + | |
| 1568 | + | |
| 1569 | + | |
1567 | 1570 | | |
1568 | | - | |
| 1571 | + | |
| 1572 | + | |
| 1573 | + | |
| 1574 | + | |
1569 | 1575 | | |
1570 | 1576 | | |
| 1577 | + | |
| 1578 | + | |
| 1579 | + | |
1571 | 1580 | | |
1572 | 1581 | | |
1573 | | - | |
| 1582 | + | |
1574 | 1583 | | |
1575 | | - | |
| 1584 | + | |
1576 | 1585 | | |
1577 | 1586 | | |
1578 | 1587 | | |
1579 | 1588 | | |
1580 | | - | |
1581 | | - | |
| 1589 | + | |
| 1590 | + | |
1582 | 1591 | | |
1583 | | - | |
1584 | | - | |
| 1592 | + | |
| 1593 | + | |
1585 | 1594 | | |
1586 | 1595 | | |
1587 | 1596 | | |
| |||
3655 | 3664 | | |
3656 | 3665 | | |
3657 | 3666 | | |
3658 | | - | |
3659 | | - | |
3660 | | - | |
| 3667 | + | |
| 3668 | + | |
| 3669 | + | |
| 3670 | + | |
| 3671 | + | |
| 3672 | + | |
| 3673 | + | |
3661 | 3674 | | |
3662 | 3675 | | |
3663 | 3676 | | |
3664 | | - | |
| 3677 | + | |
3665 | 3678 | | |
3666 | 3679 | | |
3667 | 3680 | | |
| |||
0 commit comments