2020-05-26 13:58:18 +02:00
|
|
|
const list_selectors = ["#stream_filters", "#global_filters", "#user_presences"];
|
2017-04-04 18:14:27 +02:00
|
|
|
|
2021-02-28 01:05:44 +01:00
|
|
|
export function inside_list(e) {
|
2019-11-02 00:06:25 +01:00
|
|
|
const $target = $(e.target);
|
|
|
|
const in_list = $target.closest(list_selectors.join(", ")).length > 0;
|
2017-04-04 18:14:27 +02:00
|
|
|
return in_list;
|
2021-02-28 01:05:44 +01:00
|
|
|
}
|
2017-04-04 18:14:27 +02:00
|
|
|
|
2021-02-28 01:05:44 +01:00
|
|
|
export function go_down(e) {
|
2019-11-02 00:06:25 +01:00
|
|
|
const $target = $(e.target);
|
2020-07-20 21:24:26 +02:00
|
|
|
$target.closest("li").next().find("a").trigger("focus");
|
2021-02-28 01:05:44 +01:00
|
|
|
}
|
2017-04-04 18:14:27 +02:00
|
|
|
|
2021-02-28 01:05:44 +01:00
|
|
|
export function go_up(e) {
|
2019-11-02 00:06:25 +01:00
|
|
|
const $target = $(e.target);
|
2020-07-20 21:24:26 +02:00
|
|
|
$target.closest("li").prev().find("a").trigger("focus");
|
2021-02-28 01:05:44 +01:00
|
|
|
}
|