iOS Safari 13: Default validation bubble messages are not properly aligned
Asked Answered
P

1

16

We're using HTML5 form validation without overwriting the default system UI for the validation error messages. This is working fine everywhere but on iOS Safari, where the validation messages are not aligned properly inside the bubble popup. We have tested this on two completely separate devices and with different forms. Even a minimal form with no CSS has the same result:

https://jsfiddle.net/GinSan/48hnrf92/1/

<form>
  <label for="test">Test field</label>
  <input required id="test" name="test" type="text">
  <button type="submit">Submit</button>
</form>

This is what the validation message looks like on the iOS devices we tested:

validation message in English on iPhone

validation message in German on iPad

The validation message is aligned to the top instead of centered, even though this is a system UI element. Is this a known problem? Is there anything that can be done about it, except reporting it to apple and waiting for a fix, or replacing the system validation messages?

My Safari version was Safari / iOS 13.3.1, but after upgrading to 13.5 it is still an issue.

Patinous answered 28/5, 2020 at 11:47 Comment(2)
I'm also experiencing this. Looks like a webkit issue. since all browsers on iOS must use the webkit engine, changes are you will experience this on Chrome as well. See 2.5.6: developer.apple.com/app-store/review/guidelines/…Emmaemmalee
Fwiw this seems to be resolved on iOS 14 and iOS 15Lycaonia
K
-1

Add a class to your form

and with CSS add this

display: flex;
align-items: center;
Kendra answered 4/12, 2021 at 11:34 Comment(1)
This doesn't answer the question. Please read the question carefully before attempting to answer.Patinous

© 2022 - 2024 — McMap. All rights reserved.