From 12a62e83968304b2c4849cbf9a4db1ffb7795cb2 Mon Sep 17 00:00:00 2001 From: Syphax Date: Fri, 10 Jan 2025 11:42:47 +0100 Subject: [PATCH] make the ontology viewer load the sections only if visited --- app/helpers/ontologies_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/ontologies_helper.rb b/app/helpers/ontologies_helper.rb index 742572279..f668146af 100644 --- a/app/helpers/ontologies_helper.rb +++ b/app/helpers/ontologies_helper.rb @@ -409,7 +409,7 @@ def lazy_load_section(section_title, &block) block.call else render TurboFrameComponent.new(id: section_title, src: "/ontologies/#{@ontology.acronym}?p=#{section_title}", - loading: Rails.env.development? ? "lazy" : "eager", + loading: "lazy", target: '_top', data: { "turbo-frame-target": "frame" }) end end