title: JavaScript orientation change issues in Internet Explorer
body: <p>I need to execute some JavaScript logic every time a mobile device switches from portrait to landscape orientation. I'm using the following check to accomplish this: </p>
  
  <pre><code>var doOnOrientationChange = function() {
  if (window.innerWidth &gt; window.innerHeight) {
  // Execute logic for users who are switching to landscape mode
  }
  };
  </code></pre>
  
  <p>This works for all iPhone and Android browsers, but it fails for IE10 on Windows Phone 8. Sometimes when IE10 users tap on an input, the logic for landscape mode triggers. </p>
  
  <p>Why does IE10 perceive this action as the user switching to landscape mode? </p>