- 
                Notifications
    
You must be signed in to change notification settings  - Fork 30.3k
 
[FW][FIX] web_editor: line breaks at edges of block anchor nested within li #191889
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FW][FIX] web_editor: line breaks at edges of block anchor nested within li #191889
Conversation
| 
           This PR targets 17.0 and is part of the forward-port chain. Further PRs will be created up to master. More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port  | 
    
| 
           @deso-odoo @dmo-odoo ci/runbot failed on this forward-port PR  | 
    
| 
           @deso-odoo @dmo-odoo this forward port of #171469 is awaiting action (not merged or closed).  | 
    
Commit [1] handled cases of pressing enter at the edge of an anchor, which is a child of an unbreakable element. The commit inserted the `br`'s after anchors; however, it missed the situation where the anchor tags are block elements nested inside an unbreakable element inside a `li`. In this specific case, inserting two `br` tags after a anchor block resulted in the creation of two new lines. This commit handles that case by only inserting one `br` tag after the anchor, rather than both. [1]: df6f8dd task-3631910 X-original-commit: 39b517c
This commit ensures that the link popover closes when the cursor moves outside the link. task-3631910 X-original-commit: 9609f9d
b3c522e    to
    3c0256c      
    Compare
  
    | 
           @deso-odoo @dmo-odoo this PR was modified / updated and has become a normal PR. It must be merged directly.  | 
    
| 
           @deso-odoo @dmo-odoo this forward port of #171469 is awaiting action (not merged or closed).  | 
    
    
      
        2 similar comments
      
    
  
    | 
           @deso-odoo @dmo-odoo this forward port of #171469 is awaiting action (not merged or closed).  | 
    
| 
           @deso-odoo @dmo-odoo this forward port of #171469 is awaiting action (not merged or closed).  | 
    
| 
           @dmo-odoo Runbot is green now. Had to change the tour, remember #171469 (comment).  | 
    
| 
           @robodoo rebase-ff r+  | 
    
| 
           Merge method set to rebase and fast-forward.  | 
    
Commit [1] handled cases of pressing enter at the edge of an anchor, which is a child of an unbreakable element. The commit inserted the `br`'s after anchors; however, it missed the situation where the anchor tags are block elements nested inside an unbreakable element inside a `li`. In this specific case, inserting two `br` tags after a anchor block resulted in the creation of two new lines. This commit handles that case by only inserting one `br` tag after the anchor, rather than both. [1]: df6f8dd task-3631910 X-original-commit: 39b517c Part-of: #191889 Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Commit [1] handled cases of pressing enter at the edge of an anchor, which is a child of an unbreakable element. The commit inserted the `br`'s after anchors; however, it missed the situation where the anchor tags are block elements nested inside an unbreakable element inside a `li`. In this specific case, inserting two `br` tags after a anchor block resulted in the creation of two new lines. This commit handles that case by only inserting one `br` tag after the anchor, rather than both. [1]: df6f8dd task-3631910 X-original-commit: 39b517c Part-of: odoo#191889 Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
This commit ensures that the link popover closes when the cursor moves outside the link. task-3631910 closes odoo#191889 X-original-commit: 9609f9d Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>

Description of the issue this PR addresses:
I. Commit 1 handled cases of pressing enter at the edge of an anchor, which is a
child of an unbreakable element. The commit inserted the
br's after anchors;however, it missed the situation where the anchor tags are block elements nested
inside an unbreakable element inside a
li. In this specific case, insertingtwo
brtags after a anchor block resulted in the creation of two new lines.This PR handles that case by only inserting one
brtag after the anchor,rather than both.
II. Previously when changing selection between links in website, when clicking on a
link the previous link used to get selected. This commit makes sure that when
changing selection in between links it selects the correct link.
III. This PR ensures that the link popover closes when the cursor moves outside
the link.
task-3631910
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: #171469