mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-21 08:48:57 +00:00
LibWeb: Fire change events on deletion in FormAssociated Text Elements
Some checks are pending
CI / macOS, arm64, Sanitizer, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer, Clang (push) Waiting to run
Package the js repl as a binary artifact / Linux, arm64 (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / Linux, x86_64 (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
Some checks are pending
CI / macOS, arm64, Sanitizer, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer, Clang (push) Waiting to run
Package the js repl as a binary artifact / Linux, arm64 (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / Linux, x86_64 (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
Previously we would only trigger change events on insertion, which resulted in javascript code missing changes due to deletion. This makes the calculator on the MDN simple web worker demo update on deletion as well.
This commit is contained in:
parent
87c7fb1d63
commit
849ade88ce
Notes:
github-actions[bot]
2025-08-30 23:48:55 +00:00
Author: https://github.com/IdanHo
Commit: 849ade88ce
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6032
2 changed files with 4 additions and 0 deletions
|
@ -62,6 +62,7 @@ enum class ShouldComputeRole {
|
|||
X(DidLoseFocus) \
|
||||
X(DidReceiveFocus) \
|
||||
X(EditingInsertion) \
|
||||
X(EditingDeletion) \
|
||||
X(ElementAttributeChange) \
|
||||
X(ElementSetShadowRoot) \
|
||||
X(HTMLDialogElementSetIsModal) \
|
||||
|
|
|
@ -880,6 +880,9 @@ void FormAssociatedTextControlElement::handle_delete(DeleteDirection direction)
|
|||
}
|
||||
|
||||
MUST(set_range_text({}, selection_start, selection_end, Bindings::SelectionMode::End));
|
||||
|
||||
text_node->invalidate_style(DOM::StyleInvalidationReason::EditingDeletion);
|
||||
did_edit_text_node();
|
||||
}
|
||||
|
||||
EventResult FormAssociatedTextControlElement::handle_return_key(FlyString const&)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue