title: Detect when Mobile Safari / Android Browser Navigation Bar Retracts via JavaScript
body: <p>I'm trying to create a div that fills the entire viewport's width and height on a mobile device.  The problem is, Mobile Safari and Android Browser have a navigation menu that disappears once the user begins interacting with the page.  The navigation bar makes the viewport height smaller, but when it goes away, I can find no javascript event that I can listen to so I can get updated values for the viewport height and width.</p>
  
  <p>Is there a JavaScript event that is fired when Mobile Safari's navigation menu retracts from view?  I was hoping there was an event I could listen to instead of firing a timer every x milliseconds to check the viewport height. </p>
  
  <p>Here is a chart that explains the terminology when I say "navigation bar"</p>
  
  <p><img src="https://i.stack.imgur.com/0M6X4.jpg" alt="Chart that defines the terminology for parts of the screen"> </p>