I'm using force:navigateToComponent to navigate to a different component on click.
On the first click, it navigates to the component and everything is successfully loaded.
When pressing back button and being navigated to the inner component again, the inner component is not being loaded, although, all the data is being loaded.
This issue started when the org became Summer '17. This issue is not present in Winter '17 org.
And, locker service is active.
DOM is being repeated everytime back button is pressed and then navigated to the component using
force:navigateToComponent in Summer '17 org. Also, the latest (or the last DOM) is not the one that is displayed. It varies. Sometimes, second or the first DOM element is being displayed in the front end.
Say there's a div with class "outer-wrapper" in the inner component(the one which is navigated to). So, in the first navigation,
document.getElementsByClassName('outer-wrapper').length returns 1. When the back button is pressed and then navigating again to the inner component,
document.getElementsByClassName('outer-wrapper').length becomes 2, 3 and maximum 4.
It is not just that Salesforce does not handle the old DOM element, but also, it is not the latest (or the last DOM element) which is being displayed in the front end.
This issue came to light in Summer '17 org. It is not present in Spring '17. [Eventhough DOM repetition is there, the last DOM element is the one which is displayed in the front end.]
It would be great if anyone could suggest a workaround or confirm if this is an issue in the Summer '17 org.