summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views/basic/basic_controller.js
diff options
context:
space:
mode:
authorqsm-odoo <qsm@odoo.com>2017-05-23 11:57:29 +0200
committerqsm-odoo <qsm@odoo.com>2017-05-29 13:14:22 +0200
commitb21426ab9c9ef6aa46f620a76a0642f324363137 (patch)
tree1089dcc4d6dfde6900d7cb03b6a051f3e1d785d7 /addons/web/static/src/js/views/basic/basic_controller.js
parent14b30c400087300241a862c336fc81e4819ff073 (diff)
[FIX] web_editor: properly match snippet options' DOM
Backport of 10.0 commit: 5331a87f81a7a35a0f9bb41980dd83913493cc5a The snippet options are attached to `closest`, `all` and `is` functions to be able to find/check DOM they are associated to. Their behavior depend on the snippet option type: the search in the DOM is either done in the body, the editable parts, the editable children only, .... The problem is that when searching from a given DOM element, jQuery won't match the elements whose selector contains this given DOM element. Or in code terms, jQuery find function behavior is: `$('A').find('A B')` <=> `$('A A B')` (not `$('A B')`) This was indeed a problem on the job position apply form pages where the main editable element is the <form/> element itself. Indeed, the snippet options' selectors which began by 'form' were not able to match. Worse, the selector is used for a jQuery search for drag & drop and saving but not for initialization (where it is used as a `is` check on clicked elements). So, some DOM were able to be modified by options but not properly (re)configured before saving. opw-705902 opw-741305
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_controller.js')
0 files changed, 0 insertions, 0 deletions