2.6.5
https://codesandbox.io/s/1q5prknzk7
click trigger button
iframe not reload when component not update.
The dom element is reused when the component is not updated.
iframe reload when component not update.
I think it should be related to the virtual dom's diff rule.
When the showspan1 and showspan2 are changed at the same time, the reload iframe will appear.
This problem also exists in version 2.5.x.
may be related to #4362
to prevent the insertion wrap the first span into an element that isn't removed
<iframe>s will reload whenever they are detached from the document (or after inserting them to a new location). It's definitely better if we try to move other elements around <iframe>s first but this would introduce extra complexity to the existing patching algorithms. React seems to keep the <iframe> alive in similar cases: https://codesandbox.io/s/wyq2kzw1yl
Let's close this in favor of #4362 and https://github.com/vuejs/vue/issues/10331 since their examples are simpler by not dealing with an iframe
Most helpful comment
<iframe>s will reload whenever they are detached from the document (or after inserting them to a new location). It's definitely better if we try to move other elements around<iframe>s first but this would introduce extra complexity to the existing patching algorithms. React seems to keep the<iframe>alive in similar cases: https://codesandbox.io/s/wyq2kzw1yl