diff options
author | Florrie <towerofnix@gmail.com> | 2018-07-04 22:54:27 -0300 |
---|---|---|
committer | Florrie <towerofnix@gmail.com> | 2018-07-04 22:54:27 -0300 |
commit | 5cbc7ac9030c16858e6426ae980ec8728372054e (patch) | |
tree | b7130a04ce45f574b115c2056af758218d5c97c3 | |
parent | bef63acfad7a793f9bd72cb3985c57b60bf58b77 (diff) |
Fix wrong element being selected on groups w/o parents
-rw-r--r-- | ui.js | 2 |
1 files changed, 1 insertions, 1 deletions
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) { |