odoo/odoo#192169
Created by fw-bot
Statuses:
- legal/cla: Contributor License Agreement check
- ci/runbot: Odoo Test Suite
- ci/upgrade_enterprise: Test upgrades for enterprise master
- ci/style: Optional style check. Ignore it only if strictly necessary.
- ci/security: Required security check. Can only be ignored by security team.
- label
- odoo-dev:master-16.0-fix-prevent-tab-duplication-ksbh-T9wA-fw
- head
- 305f31b7397f7a3ff03faae0e0b3be5f99b27f18
- merged
- 10 months ago by Website, Benjamin Vray (bvr)
odoo/odoo | |
---|---|
16.0 | #187014 |
17.0 | #191945 |
saas-17.2 | #192142 |
saas-17.4 | #192144 |
18.0 | #192147 |
saas-18.1 | #192157 |
saas-18.2 | |
saas-18.3 | |
saas-18.4 | |
19.0 | |
master | #192169 |
[FW][FIX] web_editor, website: prevent tab duplication
Steps To Reproduce:
-> Go to Edit mode.
-> Drag & Drop Tabs Snippet.
-> Click in middle of tab's text and press "Enter".
-> Tab is split and and new Tab is created.
Issue Reason:
As tab's element fails isUnbreakable()
check for Keydown
(Enter) event
which makes it possible to split the element. And issue is not specific
to Tab snippet but in other snippets where anchor tag
and elements with
btn
class or role attribute is button
.
Solution:
By modifying checks in isUnbreakable()
for handling elements with anchor
tags
and elements with btn
class or role attribute is button
.
This PR solves the issue of tab duplication in Tab Snippet and few snippets in which there is already button and the said behavior is observed are : Cover
, Text - Image
, Image - Text
, Carousel
, Donate
Now ( Button )
where anchor tag and elements with 'btn' class or role attribute is 'button', in Masonry
and Carousel
snippet which adds button
through Add Element
option and also when we add a button using /button
command in any snippets.