You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Websites can use constraint validation to check the validity of form elements, and if those elements are invalid, then a message tooltip/bubble will be shown to indicate to the user that the field is invalid. Currently, the bubble that is a part of Chromium appears, but it would be nice to have a custom validity bubble that feels more integrated into gShell.
We can achieve this by checking for the "invalid" event and preventDefaulting it to prevent the bubble from appearing. We can then show our own custom tooltip by getting the validation message from event.target.validationMessage. We may want to provide a custom default, localised validation message (and not use the Chromium one) by checking if the validationMessage is generic (against a generic input) and then showing our own message if it is the same.
The text was updated successfully, but these errors were encountered:
Websites can use constraint validation to check the validity of form elements, and if those elements are invalid, then a message tooltip/bubble will be shown to indicate to the user that the field is invalid. Currently, the bubble that is a part of Chromium appears, but it would be nice to have a custom validity bubble that feels more integrated into gShell.
We can achieve this by checking for the
"invalid"
event andpreventDefault
ing it to prevent the bubble from appearing. We can then show our own custom tooltip by getting the validation message fromevent.target.validationMessage
. We may want to provide a custom default, localised validation message (and not use the Chromium one) by checking if thevalidationMessage
is generic (against a genericinput
) and then showing our own message if it is the same.The text was updated successfully, but these errors were encountered: