From 5e91760f351df406db14eb5c227ce8dc259ceacc Mon Sep 17 00:00:00 2001 From: FelisCatus Date: Sat, 27 Dec 2014 19:23:17 +0800 Subject: [PATCH] Select active profile in popup menu by default. Fix #24. --- omega-web/src/coffee/popup.coffee | 2 ++ 1 file changed, 2 insertions(+) diff --git a/omega-web/src/coffee/popup.coffee b/omega-web/src/coffee/popup.coffee index bbf919cf..84cbdda9 100644 --- a/omega-web/src/coffee/popup.coffee +++ b/omega-web/src/coffee/popup.coffee @@ -13,6 +13,8 @@ jQuery(document).on 'keydown', (e) -> items = jQuery('.popup-menu-nav > li:not(.ng-hide) > a') i = items.index(jQuery(e.target).closest('a')) + if i == -1 + i = items.index(jQuery('.popup-menu-nav > li.active > a')) switch e.keyCode when 38 i--