My app is basically a angular-material md-toolbar, and a md-content.
I want the md-toolbar to disappear as user scrolls the md-content.
This would be simple enough following the md-scroll-shrink attribute's documentation.
However, my md-content directive is simply a wrapper for an iframe. So, when the user scrolls the app, they are really scrolling the iframe within the md-content directive. This means the md-toolbar directive doesn't pick up on the md-content being scrolled, and remains full height (not shrinking, like I want).
I've taken the original
<div ng-controller="AppCtrl" layout="column" style="height:600px" ng-cloak=""
class="toolbardemoScrollShrink" ng-app="MyApp">
<md-toolbar
md-scroll-shrink="" ng-if="true" ng-controller="TitleController">`
Angular Material Scroll Shrink demo and forked it here with an iframe in the md-content.
<md-content flex="">
<!-- Scroll Wrapper for mobile iOS touch-scrolling -->
<div class="scroll-wrapper" style="width:100%;height:400px;">
<iframe id="some_frame_id"
src="https://en.wikipedia.org/wiki/Main_Page"
style="width:100%;height:400px;"
frameborder="0" border="0" marginwidth="0" marginheight="0" scrolling="auto"
>
</iframe>
</div>
</md-content>
Can javascript on the main page detect scrolling of its iframe? If so, I can perhaps write custom logic to scroll the containing page, or shrink the toolbar with css.