Web form not recognizing data input in portrait on mobile phones

Web form not recognizing data input in portrait on mobile phones

Hey all, I have copied the JS Code into the web page and the form works fine on all devices apart from mobile phones when they are in portrait. I have tried different phones and different browsers with the same result. When the form is filled out it doesn't recognize this and states that the First Name cannot be empty. It will work if the mobile phone is in landscape view.