mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
LibWeb: Send InputEvent with right .inputType on insert and delete
Applies to `<input>` and `<textarea>`. Editing commands in `contenteditable` already sent the right events and input types. Fixes #7668
This commit is contained in:
committed by
Jelle Raaijmakers
parent
c9108a2ad5
commit
e05503dbcb
Notes:
github-actions[bot]
2026-02-06 10:55:26 +00:00
Author: https://github.com/gmta Commit: https://github.com/LadybirdBrowser/ladybird/commit/e05503dbcbb Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/7669
@@ -2,7 +2,7 @@
|
||||
* Copyright (c) 2020, the SerenityOS developers.
|
||||
* Copyright (c) 2022, Luke Wilde <lukew@serenityos.org>
|
||||
* Copyright (c) 2024, Bastiaan van der Plaat <bastiaan.v.d.plaat@gmail.com>
|
||||
* Copyright (c) 2024, Jelle Raaijmakers <jelle@ladybird.org>
|
||||
* Copyright (c) 2024-2026, Jelle Raaijmakers <jelle@ladybird.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
@@ -125,7 +125,7 @@ public:
|
||||
void set_dirty_value_flag(Badge<FormAssociatedElement>, bool flag) { m_dirty_value = flag; }
|
||||
|
||||
// ^FormAssociatedTextControlElement
|
||||
virtual void did_edit_text_node() override;
|
||||
virtual void did_edit_text_node(FlyString const& input_type) override;
|
||||
virtual GC::Ptr<DOM::Text> form_associated_element_to_text_node() override { return m_text_node; }
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/form-elements.html#the-textarea-element%3Asuffering-from-being-missing
|
||||
@@ -164,6 +164,7 @@ private:
|
||||
GC::Ptr<DOM::Text> m_text_node;
|
||||
|
||||
RefPtr<Core::Timer> m_input_event_timer;
|
||||
FlyString m_pending_input_event_type;
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#concept-fe-dirty
|
||||
bool m_dirty_value { false };
|
||||
|
||||
Reference in New Issue
Block a user