Skip to content
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: convert inline before send message #165205

Commits on May 13, 2024

  1. [FIX] web_editor: convert inline before send message

    Commit that introduced the issue: [1]
    
    Issue:
    ======
    The email sent from chatter message isn't correctly formatted.
    
    Steps to reproduce the issue:
    =============================
    - Go to chatter of any form view
    - Open the mail compose modal
    - Add a primary link the in the email body
    - Send it
    - The email isn't formatted in the received email.
    
    Origin of the issue:
    ====================
    The flow goes as follow, we first change the field and then when
    clicking send, we first update the value of the editor by
    `onWysiwygBlur` , then before the send is done, the field is saved which
    will trigger the event `NEED_LOCAL_CHANGES` which will call
    commitChanges, but since we already updated the value and we don't have
    urgent, nothing will happend and the function `toInline` will never be
    called.
    
    Solution:
    =========
    To not break the old commit behavior and make it reset with disard, we
    add another flag `shouldInline` so we can force `commitChanges` and
    calculating inline style when saving.
    
    [1]: odoo@3573167
    
    opw-3885368
    
    X-original-commit: b7ecc3f
    Mtaylorr committed May 13, 2024
    Configuration menu
    Copy the full SHA
    4f076cb View commit details
    Browse the repository at this point in the history