Commit 5d7bf685 authored by Emma's avatar Emma 🦉

fix mistake in dropdown keyboard support

parent 3dd95491
Pipeline #52118974 passed with stages
in 6 minutes and 38 seconds
......@@ -44,10 +44,10 @@ function moveInList($dropdown, amount) {
const $elements = $dropdown.find(FOCUSABLE_ELEMENTS);
let i = $elements.index($(':focus')) + amount;
if (i < 0) {
i = $elements.length - 1;
} else if (i < 0) {
if (i >= $elements.length) {
i = 0;
} else if (i < 0) {
i = $elements.length - 1;
}
$elements.get(i).focus();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment