avo icon indicating copy to clipboard operation
avo copied to clipboard

Resource links, rendered in tabs, not working as intended

Open nicholaswellens opened this issue 3 years ago • 3 comments
trafficstars

Describe the bug

belongs_to links (and other links that do not have turbo disabled or target set) that are defined under tabs, don't work correctly.

Steps to Reproduce

  1. Go to show page of a resource that has tabs
  2. Press the link of a belongs_to field
  3. Does not direct correctly to the associated resource

Expected behavior & Actual behavior

  • Expected: Directs to the associated resource after pressing link
  • Actual: stays on same page, tabs disappear

Screenshots

Screenshot from 2022-08-31 11-12-55

Screenshot from 2022-08-31 11-14-57

(From a different tab & field) image

Notes

Adding target: "_top" to link_to in the belongs_to component solves the problem (but not sure if that is the correct approach)

System configuration

Avo version: 2.12.0 (also tested with 2.14.2)

Rails version: 6.1.6.1

Ruby version: 3.0.2

Impact

  • [ ] High impact
  • [] Medium impact
  • [x] Low impact

Urgency

  • [ ] High urgency
  • [x] Medium urgency
  • [ ] low urgency

nicholaswellens avatar Aug 31 '22 10:08 nicholaswellens

Ok. I see the issue. Could you please use your workaround until we push a permanent fix? Thank you!

adrianthedev avatar Aug 31 '22 10:08 adrianthedev

Hey, thanks for the note @nicholaswellens, actually that was my approach too, with a little tweak, we only apply target: "_top" when the field is inside a tab group

Paul-Bob avatar Sep 17 '22 11:09 Paul-Bob

@Paul-Bob Great! Thanks for the fix! :+1:

nicholaswellens avatar Sep 19 '22 08:09 nicholaswellens