bc440ff0454ac03c7ef68e87fedc61e871a4e1b3
Reproduction: 1. in Note, type ` abcd ` in an empty note 2. color the background of all the text, bold `abcd` 3. select from the end till the letter `b`, try to change the color, traceback pops up Fix: The main reason is we remove element in `splitElement`/ `splitAroundUntil`. In this special case, there are two selected nodes which returns the same font element. The first font element will be removed and replaced first. Because the first font element doesn’t exist anymore, when recovering selection, the second element considered as collapsed and the recovered selection is a caret. Thus the color picker is gone after applying the color (preview) The fix is then, we always make sure that the font we have is still connected to the page (exist in the page), otherwise it’s problematic to apply color to a non-existing element and recover cursor from it. If there is font element(s) that is not connected, we simply get the fonts again, because new font element is created for the second node, it won’t split (remove) the first node’s font element again Task-3476494 closes odoo/odoo#150500 X-original-commit: 06a8b930176093e2c5a853b78431316af90f3550 Signed-off-by: Nicolas Bayet (nby) <nby@odoo.com> Signed-off-by: Jinjiu Liu (jili) <jili@odoo.com> Co-authored-by: Goaman <nby@odoo.com>
…
…
…
Odoo
Odoo is a suite of web based open source business apps.
The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...
Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.
Getting started with Odoo
For a standard installation please follow the Setup instructions from the documentation.
To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%