Skip to content
Snippets Groups Projects
user avatar
Benjamin Vray authored
The commit [1] was recently merged with a bug, and this commit fixes it.

The bug is due to the fact that when comparing the current page to a
redirection with an anchor, we added a trailing slash if it was missing
for the current page but not for the redirection. In some cases, this
resulted in unintended behavior where the user was redirected to the
same page instead of just scrolling to the anchor on the current page.

Steps to reproduce the bug:

- Open the "contact us" page in edit mode
- Drag and drop a snippet below the form and create a link to that
snippet by clicking on the "anchor" option button of the snippet.
- Change the form redirection option to redirect to this newly created
anchor upon form submission by copying the contents of the clipboard
into the input of the option.
- Save the page.
- Fill out the form and click the submit button.
- Bug: The page is reloaded instead of smoothly scrolling down to the
bottom snippet without reloading the page.

[1]: https://github.com/odoo/odoo/commit/fb087dbec96f5e533d1fdd9c2b0c2e00296c83de



task-2172312

closes odoo/odoo#120907

Signed-off-by: default avatarRomain Derie (rde) <rde@odoo.com>
0604b951
History
Name Last commit Last update