summaryrefslogtreecommitdiff
path: root/addons/web/static/src/xml/base_common.xml
diff options
context:
space:
mode:
authorqsm-odoo <qsm@odoo.com>2016-09-16 16:30:32 +0200
committerqsm-odoo <qsm@odoo.com>2016-09-16 16:43:19 +0200
commitf98aa664df8ff36d5c0f035c98ca691811530267 (patch)
treeab06596c6fb28c770a91c9416a4fc7d85277fb72 /addons/web/static/src/xml/base_common.xml
parent5b796318b497e6d89c8763983ab89889aa41417b (diff)
[FIX] web: fix low perf. of web_tour when a modal is opened
When a modal was opened, the system seemed slower because a web_tour callback was called every 500 ms. This was because of jQuery. Using the "find" method on a jQuery element will temporary set an ID on this element for some jQuery reason. So, when a modal opened, a DOM mutation was caught by the web_tour observer which then called the "update" method in which a $modal.find is done... and so an ID was set and a new DOM mutation was caught again. The solution here is to provide an unique ID on each modal in odoo so that the find function has not to set an ID, and so does not trigger any DOM mutation.
Diffstat (limited to 'addons/web/static/src/xml/base_common.xml')
-rw-r--r--addons/web/static/src/xml/base_common.xml2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web/static/src/xml/base_common.xml b/addons/web/static/src/xml/base_common.xml
index 1570b5a8717..2af69b61118 100644
--- a/addons/web/static/src/xml/base_common.xml
+++ b/addons/web/static/src/xml/base_common.xml
@@ -3,7 +3,7 @@
<!-- These templates are accessible in backend and frontend -->
-<div t-name="Dialog" class="modal" tabindex="-1" data-backdrop="static" role="dialog" aria-hidden="true">
+<div t-name="Dialog" class="modal" tabindex="-1" data-backdrop="static" role="dialog" aria-hidden="true" t-att-id="_.uniqueId('modal_')">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">