Resize bug in IOS 8

Safari bundled with IOS 8 comes with a new interface that shrinks the location bar and hides the button bar after scrolling. For this reason, the slim menu closes every time the page is scrolled (resize event reset the menu). In order to prevent this, I restricted the reset to window width resizes.