mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 00:19:53 +01:00
LibWeb: Fire change events on deletion in FormAssociated Text Elements
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
|
|
@ -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…
Reference in New Issue
Block a user