Hi Chris
Thank you for the suggestions and for the sample code. And I understand that passing all scroll events to iframe might be problematic.
But there are several issues why the current sizeToParent solution does not quite suite our needs:
- In this case both standard JIRA header and footer is visible on the screen and just our content between them is scrollable.
JIRA footer takes significant space (more than 100 pixels) and we would like to use all window space to show our content. It would be good if AP.sizeToParent() function had a parameter where we could specify that we want to resize the iframe to the full height of the window (taking also the space of standard JIRA footer). And even better if we could specify the desired height of the iframe - if it is less than window height then it would be used or otherwise iframe would be resized to the window height and then iframe would show a scrollbar.
In addition it would be good if we could hide the standard JIRA header - e.g. when iframe content is scrolled down then we could hide the JIRA standard header (and resize iframe to take full height) and when the iframe is scrolled back to the top then we could show JIRA header again.
- The other problem is that when using sizeToParent then the iframe is not resized when the window is resized.
If window width is changed then iframe width is changed as well and resize event is triggered in iframe - we could use it to manually trigger AP.sizeToParent().
But if just window height is changed then resize is not happening in the iframe.
It would be good to get all window resize events also inside iframe to be able to initiate AP.sizeToParent() manually.
If we could have more control over JIRA header and footer visibility and be able to get all window resize events then probably we could use this modified sizeToParent solution.
Any comments on these suggestions?
Kind regards,
Raimonds