if (submitElement && submitElement->formNoValidate())
return true;
+ for (unsigned i = 0; i < m_associatedElements.size(); ++i)
+ m_associatedElements[i]->hideVisibleValidationMessage();
+
Vector<RefPtr<HTMLFormControlElement> > unhandledInvalidControls;
collectUnhandledInvalidControls(unhandledInvalidControls);
if (unhandledInvalidControls.isEmpty())
// If the form has invalid controls, abort submission.
RefPtr<HTMLFormElement> protector(this);
- // Focus on the first focusable control.
+ // Focus on the first focusable control and show a validation message.
for (unsigned i = 0; i < unhandledInvalidControls.size(); ++i) {
HTMLFormControlElement* unhandled = unhandledInvalidControls[i].get();
if (unhandled->isFocusable() && unhandled->inDocument()) {
// moved to another document.
if (unhandled->isFocusable() && unhandled->inDocument() && originalDocument == unhandled->document()) {
unhandled->focus();
+ unhandled->updateVisibleValidationMessage();
break;
}
}