hide navigation bars in safari ios
removed unnecessary recalculation for mobile device