mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2026-04-19 02:10:26 +00:00
LibWeb: Move <input> handle_return_key logic to HTMLInputElement
This commit is contained in:
parent
e39f73f978
commit
f6f4d7f497
Notes:
github-actions[bot]
2025-12-29 19:00:51 +00:00
Author: https://github.com/jonbgamble
Commit: f6f4d7f497
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/7229
Reviewed-by: https://github.com/shannonbooth ✅
4 changed files with 10 additions and 15 deletions
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue