When the document is loaded inside an iframe and the iframe is made visible after it's content has been loaded then the browser scrollbar doesn't hide.
The getBrowserScrollSize function returns the scrollbar width and height as 0 in this case, and hence the scrollbar isn't hidden.
Demo of issue: https://codepen.io/anon/pen/ZyYXdZ
When the document is loaded inside an iframe and the iframe is made visible after it's content has been loaded then the browser scrollbar doesn't hide.
The getBrowserScrollSize function returns the scrollbar width and height as 0 in this case, and hence the scrollbar isn't hidden.
Firefox version: 53.0.3 (32-bit)