different js implementation of keeping within ios full screen