[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.
This commit is contained in:
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user