ux
ux copied to clipboard
[TURBO] Impossible to redirect with anchor
Hi ! Im'm using Turbo UX with Symfony 7, I can confirm anchors don't work. If turbo-core is enable :
$url = $this->generateUrl('back_client_actu_gerer').'#article'.$article->getId();
return $this->redirect($url);
redirects me to "/gerer" (with or without "/" before "#") If turbo-core is disable, no problem, the same command redirects me to "/gerer#article102". There's no issue ? Thx
Witch version of Turbo are you using?
"symfony/ux-turbo": "^2.13" = v2.14.2
Found a solution : 'data-turbo' => 'false' Not a good solution, the page refreshes
Looks like this is a Turbo issue: https://github.com/hotwired/turbo/issues/598. Could you try if the following solution feat your need: https://github.com/hotwired/turbo/issues/598#issuecomment-1670338691
Found a solution : 'data-turbo' => 'false' Not a good solution, the page refreshes
https://github.com/hotwired/turbo/issues/211 I see your comment in this discussion. I think unfortunately we don't have more way to solve this issue than the ruby community since this is a browser issue... https://github.com/hotwired/turbo/issues/211#issuecomment-966570923. I think the best way could be to manually scroll to your anchor with javascript. Sorry about that.
Ok, thanks for your response