Angular component reloads when pressing the Chrome debug tool rotate to landscape button

411 views Asked by At

Using Chrome devtools, toggling between regular and landscape view on a specific phone/tablet (not responsive), the app reloads the component and app.component.ts (constructor and ngOnInit)

QUESTION - Is this expected behavior? I wasn't noticing this before 1 day ago and it only triggers a reload when on a phone/tablet, not in the responsive view of devtools.

FYI - I just opened and ran another project and it's doing it as well.

Does this mean that on an actual phone/tablet the component and project will be reloaded when the user switches from vertical to landscape mode, or is this something I messed up in my project/s or Chrome???

Any help in debugging this would be appreciated

2

There are 2 answers

2
Jovi Tan On

Do you get the same issue when using Firefox dev tools? I noticed I am facing this issue on every website once I update my Google chrome to latest version today, however this does not happen with Firefox dev tools

0
kiddailey On

Found this post because I was having the same issue while debugging a React app on Windows Chrome 86.0.4240.75.

This appears to have been a bug in that version. I updated to Chrome 86.0.4240.111 and the problem no longer occurs for me. Hopefully that'll work for you as well.