From 5cbc7ac9030c16858e6426ae980ec8728372054e Mon Sep 17 00:00:00 2001 From: Florrie Date: Wed, 4 Jul 2018 22:54:27 -0300 Subject: Fix wrong element being selected on groups w/o parents --- ui.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ui.js') diff --git a/ui.js b/ui.js index 4ad09e9..13774cd 100644 --- a/ui.js +++ b/ui.js @@ -666,7 +666,7 @@ class GrouplikeListingForm extends ListScrollForm { } get firstItemIndex() { - return Math.min(this.inputs.length, 1) + return Math.max(0, this.inputs.findIndex(el => el instanceof GrouplikeItemElement)) } selectAndShow(item) { -- cgit 1.3.0-6-gf8a5