From 17b0de4d8fb04f88506c0c73033726d20c919692 Mon Sep 17 00:00:00 2001 From: Joey Arhar Date: Mon, 11 Nov 2024 10:40:55 -0800 Subject: [PATCH] Prevent document from scrolling in customizable select popover Pressing up or down on the first or last option of a customizable select should not let the document scroll. This was happening because the default event handler of the option was not handling the default if there was no option to focus in this keyboard event handler, but by setting the default as handled anyway this bug goes away. This was identified here: https://github.com/openui/open-ui/issues/1087#issuecomment-2381094286 Change-Id: I56ab094f468df1ef4847011763e20ea7e759d3f0 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6006515 Commit-Queue: Joey Arhar Reviewed-by: Traian Captan Cr-Commit-Position: refs/heads/main@{#1381284} --- .../select-option-arrow-scroll.tentative.html | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 html/semantics/forms/the-select-element/customizable-select/select-option-arrow-scroll.tentative.html diff --git a/html/semantics/forms/the-select-element/customizable-select/select-option-arrow-scroll.tentative.html b/html/semantics/forms/the-select-element/customizable-select/select-option-arrow-scroll.tentative.html new file mode 100644 index 00000000000000..cb65bddc0715bc --- /dev/null +++ b/html/semantics/forms/the-select-element/customizable-select/select-option-arrow-scroll.tentative.html @@ -0,0 +1,53 @@ + + + + + + + + + + + + +
+ + + +