Good day guys, I hope someone knows how I can run a function only when the phone device changes orientation. I mean exactly ONLY when the phone device changes its orientation, not when keyboard opens >> this is the problem.
I know this window.innerWidth > window.innerHeight, and in conjunction with resize event, it gives me what I need: determination landscape and portrait. But I just now tested my website on Android, and when the keyboard opens this gives me a fake landscape result, I mean device orientation not was changed for real. So, this is the question, how I can run my function when the phone (Android, iOS) changes its orientation, but prevent it if the orientation changes because of keyboard opens.