Skip to content
Snippets Groups Projects
Commit 987f189e authored by Benjamin Vray's avatar Benjamin Vray
Browse files

[FIX] web_editor, website: fix style tab selected after closing a popup


Steps to reproduce the bug:

    - In edit mode, drag and drop a popup in a page.
    - Click on the "Win $20" text in the popup to activate the overlay
    of the column.
    - Close the popup by clicking on the "s_popup_close" button.
    - Bug => the "style" tab is still activated (instead of the "blocks"
    tab).

This is actually a more general bug: when selecting text anywhere in the
page, there is no check to know if the range is editable or not.
(e.g. Selecting a link in the navbar of the "table of content" snippet
makes the toolbar appear and it is possible to change the color/size of
the selected text while these links are in a non-editable element.)

This commit adds the missing check to know if a selected range is
editable or not to show/hide the text toolbar.

This commit also removes the duplicate
"snippet_option_visibility_update" trigger_up when closing a popup with
the "close" button. It is not necessary because it is called anyway in
the "hide" event triggered by "onTargetHide".

task-3072669

closes odoo/odoo#105957

Signed-off-by: default avatarBenoit Socias (bso) <bso@odoo.com>
parent 32592758
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment