Thursday, July 25, 2024
2 changes · saas-17.2
Resolved issues and error corrections
Website maps now wait for address lookup to finish before choosing the map center. This prevents maps from opening in the wrong place when coordinates are not already available, improving visitor experience on location pages.
Original PR description
Before this commit, the map could be wrongly centered if the longitude and latitude were unknown and localized on the fly using the JavaScript Geocoder API, as we did not wait for the result. Now, the code is reorganized as an async function, and we await all the promises before computing the map options.
This fixes a web testing helper so it more accurately detects whether an element is attached to a document. It helps prevent incorrect test behavior in edge cases, improving reliability for Odoo's web interface quality checks.
Original PR description
This commit ensures that the `isInDOM` helper function in Hoot actually checks that the given target is connected to a document. The previous implementation was naïve and only relied on the presence of a parent element. This was incomplete as there are some cases where a node is connected to a document element without having a `parentNode`. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr