From a144f49ec23edc53b62d3e81b906d4cfccac6632 Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Wed, 8 Dec 2021 12:22:18 +0100 Subject: [PATCH] UX: scroll row to top of container in select-kit (#15230) --- .../javascripts/select-kit/addon/components/select-kit.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/select-kit/addon/components/select-kit.js b/app/assets/javascripts/select-kit/addon/components/select-kit.js index 937628b4de9..f36a0db32f3 100644 --- a/app/assets/javascripts/select-kit/addon/components/select-kit.js +++ b/app/assets/javascripts/select-kit/addon/components/select-kit.js @@ -714,7 +714,7 @@ export default Component.extend( rowContainer = this.element.querySelector(".select-kit-row.is-none"); } - rowContainer && rowContainer.focus({ preventScroll }); + rowContainer?.focus({ preventScroll }); }, _highlightLast() { @@ -989,7 +989,7 @@ export default Component.extend( } if (highlighted) { - this._scrollToRow(highlighted); + this._scrollToRow(highlighted, false); this.set("selectKit.highlighted", highlighted); } }