6adab9556a8279cea58d95b1152555292a5f856f
Reproduction: 1. Create a link right after some text 2. Remove the whole line by backspace character by character(this should give the p element a history steps id) 3. Try to create a link again 4. The new link is invisible and actually created in br when inspecting the page Reason: this is an edge case on Chrome that the document.getSelection() returns a selection which has br element as the anchorNode. It may happen when the parent element of the br has history steps and only has this br element. However, the same steps done on Firefox return the correct selection on the parent element. Fix: we make a special case when the selection is a caret type and the anchorNode is a br element, we re-select the parent element and collapse the selection to the start. This is trying to mimic the normal case of adding a link to an empty p element, e.g selection anchorNode is p, offset is 0. task-3181486 closes odoo/odoo#136879 X-original-commit: 084ac2a375224288f182961ff98915dbeb428bd6 Signed-off-by: David Monjoie (dmo) <dmo@odoo.com> Signed-off-by: Jinjiu Liu (jili) <jili@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%