md-tab: iframe reloads on tab focus
Bug, feature request, or proposal:
Bug
What is the expected behavior?
iframe content shouldn't be reloaded every time the tab is on focus.
What is the current behavior?
iframe embedded with tab causes the iframe to reload as and when user keeps switching between the tabs.
What are the steps to reproduce?
Step 1: Create 2 tabs with having iframe in 1st tab. Step 2: Keep the iframe src to some external page (for data entry purpose). Step 3: Fill some fields in tab 1 frame. Step 4: Toggling tabs will reload iframe everytime.
Providing a Plunker (or similar) is the best way to get the team to see your issue. Plunker template: http://plnkr.co/edit/DADYadzGOFI5GqkkITkA?p=preview
What is the use-case or motivation for changing an existing behavior?
It's a bug, the existing behavior is unintended
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular: 4.2.2 Material: 2.0.0-beta.6
Is there anything else we should know?
I have the same issue embedding Node Red into my App. The behaviour is similar with object tag. Any help will be much appreciated.
Not sure if this issue is related to #731 and #1472
See https://github.com/angular/angular/issues/16994
@jelbourn @tbosch Caching doesn't resolve the problem when the iframe is embedded within a tab.
Check the plunker updated with tabs: http://plnkr.co/edit/kA5XtZ?p=preview
Can you please suggest a work around for tabs
@anupvarma it is a bug in Angular, not something that can be addressed at the application level
Guys any solution to this issue. Having similar issue
<mat-tab-group>
<mat-tab>Content 1</mat-tab>
<mat-tab><object style="height:500px;width:1000px" data="https://www.wynk.in/music"></object></mat-tab>
</mat-tab-group>
The second tab reloads.
had same issue - iframe is reloading on calendar toggle, menu toggle and so on ... every interaction This was solution: https://stackoverflow.com/questions/39429293/url-sanitization-is-causing-refresh-of-the-embedded-youtube-video
Probably the issue is that tab component is playing on the "display" value. I made a similar component which changes the "visiblity" value instead of "display" and it stopped reloading.
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.