From 6f491c45bc5182275419be89a0820c2deaddc6b0 Mon Sep 17 00:00:00 2001 From: Utkarsh Pathak Date: Fri, 31 May 2024 02:42:05 -0700 Subject: [PATCH] Dispatch BeforeInput Event for number input spin button and Arrow key https://w3c.github.io/uievents/#event-type-beforeinput A user agent MUST dispatch beforeinput event when the DOM is about to be updated. Bug: 40948436 Change-Id: Idc894f4e7427a81e684b37cc10749b4386e5aa7d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5443103 Reviewed-by: Mason Freed Commit-Queue: Utkarsh Pathak Reviewed-by: Sanket Joshi Reviewed-by: Anupam Snigdha Cr-Commit-Position: refs/heads/main@{#1308524} --- ...w-key-on-number-input-delete-document.html | 37 +++++++++++++++++ ...w-key-on-number-input-prevent-default.html | 33 +++++++++++++++ ...nput-events-arrow-key-on-number-input.html | 32 +++++++++++++++ ...click-on-number-input-delete-document.html | 40 +++++++++++++++++++ ...click-on-number-input-prevent-default.html | 35 ++++++++++++++++ ...nts-spin-button-click-on-number-input.html | 34 ++++++++++++++++ 6 files changed, 211 insertions(+) create mode 100644 input-events/input-events-arrow-key-on-number-input-delete-document.html create mode 100644 input-events/input-events-arrow-key-on-number-input-prevent-default.html create mode 100644 input-events/input-events-arrow-key-on-number-input.html create mode 100644 input-events/input-events-spin-button-click-on-number-input-delete-document.html create mode 100644 input-events/input-events-spin-button-click-on-number-input-prevent-default.html create mode 100644 input-events/input-events-spin-button-click-on-number-input.html diff --git a/input-events/input-events-arrow-key-on-number-input-delete-document.html b/input-events/input-events-arrow-key-on-number-input-delete-document.html new file mode 100644 index 00000000000000..20dad0da40a1cb --- /dev/null +++ b/input-events/input-events-arrow-key-on-number-input-delete-document.html @@ -0,0 +1,37 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/input-events/input-events-arrow-key-on-number-input-prevent-default.html b/input-events/input-events-arrow-key-on-number-input-prevent-default.html new file mode 100644 index 00000000000000..cc3984fe64dcbc --- /dev/null +++ b/input-events/input-events-arrow-key-on-number-input-prevent-default.html @@ -0,0 +1,33 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/input-events/input-events-arrow-key-on-number-input.html b/input-events/input-events-arrow-key-on-number-input.html new file mode 100644 index 00000000000000..75c594c2cbe517 --- /dev/null +++ b/input-events/input-events-arrow-key-on-number-input.html @@ -0,0 +1,32 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/input-events/input-events-spin-button-click-on-number-input-delete-document.html b/input-events/input-events-spin-button-click-on-number-input-delete-document.html new file mode 100644 index 00000000000000..1b179952ca446e --- /dev/null +++ b/input-events/input-events-spin-button-click-on-number-input-delete-document.html @@ -0,0 +1,40 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/input-events/input-events-spin-button-click-on-number-input-prevent-default.html b/input-events/input-events-spin-button-click-on-number-input-prevent-default.html new file mode 100644 index 00000000000000..558000940c987e --- /dev/null +++ b/input-events/input-events-spin-button-click-on-number-input-prevent-default.html @@ -0,0 +1,35 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/input-events/input-events-spin-button-click-on-number-input.html b/input-events/input-events-spin-button-click-on-number-input.html new file mode 100644 index 00000000000000..e86be1798e475b --- /dev/null +++ b/input-events/input-events-spin-button-click-on-number-input.html @@ -0,0 +1,34 @@ + + + + + + + + + + + + + \ No newline at end of file