davidjbradshaw / iframe-resizer

Keep iFrames sized to their content.
https://iframe-resizer.com
Other
6.67k stars 981 forks source link

Scroll to element on AJAX request not working in child page even with scrolling set to yes #1194

Closed Zach-Toth closed 7 months ago

Zach-Toth commented 11 months ago

Describe the bug I have a paginated list in my child page that scrolls to the top of the list when next or prev button is clicked. This functionality is not working within the parent page. The AJAX request reloads the list, but the autoscroll does not move the page. I can tell it tries to complete the scroll because my sticky header appears (I have it set to appear on scroll up) but the child content does not move.

Here are my settings:

iFrameResize({ 
  log: true,
  heightCalculationMethod: 'bodyScroll',
  checkOrigin: false,
  scrolling: true, 
  resizeFrom: 'child' 
}, '#rec-physicians-iframe')
davidjbradshaw commented 7 months ago

My only guess is that you should avoid using bodyScroll for this, but without a detailed working example it is difficult to say.