LibWeb: Move <input> handle_return_key logic to HTMLInputElement

This commit is contained in:
Jonathan Gamble 2025-12-29 11:08:52 -06:00 committed by Shannon Booth
parent e39f73f978
commit f6f4d7f497
Notes: github-actions[bot] 2025-12-29 19:00:51 +00:00
4 changed files with 10 additions and 15 deletions

View file

@ -1983,6 +1983,15 @@ void HTMLInputElement::form_associated_element_was_inserted()
}
}
EventResult HTMLInputElement::handle_return_key(FlyString const&)
{
if (auto* form = this->form())
form->implicitly_submit_form().release_value_but_fixme_should_propagate_errors();
else
commit_pending_changes();
return EventResult::Handled;
}
bool HTMLInputElement::is_presentational_hint(FlyString const& name) const
{
if (Base::is_presentational_hint(name))