[FIX] website_form: fix form redirection to an anchor in the same page
Before this commit, when the redirection of a form was an anchor and that anchor link came from the anchor option, the scroll animation was not triggered. task-2172312 closes odoo/odoo#81622 X-original-commit: 5db838cfc91d8438d6234df00bd8174768445974 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit is contained in:
@@ -292,6 +292,7 @@ odoo.define('website.s_website_form', function (require) {
|
||||
}
|
||||
switch (successMode) {
|
||||
case 'redirect':
|
||||
successPage = successPage.startsWith("/#") ? successPage.slice(1) : successPage;
|
||||
if (successPage.charAt(0) === "#") {
|
||||
dom.scrollTo($(successPage)[0], {
|
||||
duration: 500,
|
||||
|
||||
Reference in New Issue
Block a user