From 504a0bee625fec3fe207a152ecc166502e9cd2f1 Mon Sep 17 00:00:00 2001 From: ajugo Date: Mon, 17 Jul 2023 10:55:36 +0200 Subject: [PATCH] Fix scroll for protocols.io [SCI-8825] (#5774) --- app/assets/javascripts/protocols/protocolsio.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/protocols/protocolsio.js b/app/assets/javascripts/protocols/protocolsio.js index 78610ba0a..0695f7be5 100644 --- a/app/assets/javascripts/protocols/protocolsio.js +++ b/app/assets/javascripts/protocols/protocolsio.js @@ -44,7 +44,8 @@ function applyClickCallbackOnProtocolCards() { // Set iframe content iFrame.contents().find('body').html(data.html); - scrollbox.scrollTo(0); + scrollbox.scrollTop(0); + iFrame.contents().find('body').find('table.htCore') .css('width', '100%') .css('table-layout', 'auto'); @@ -130,7 +131,7 @@ function applySearchCallback() { } else if (data.html) { resetPreviewPanel(); $('.empty-text').hide(); - listWrapper.show().html(data.html).scrollTo(0); + listWrapper.show().html(data.html).scrollTop(0); } else { setDefaultViewState(); }