From 670740629404fa2e1c8558d77ecb8c969ab58caf Mon Sep 17 00:00:00 2001 From: rolux Date: Mon, 24 Oct 2011 16:37:50 +0000 Subject: [PATCH] keep selected list from stealing focus from input element on home screen --- static/js/pandora/home.js | 2 -- static/js/pandora/utils.js | 5 +++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/static/js/pandora/home.js b/static/js/pandora/home.js index 00f11e54..e0a6ed78 100644 --- a/static/js/pandora/home.js +++ b/static/js/pandora/home.js @@ -2,8 +2,6 @@ pandora.ui.home = function() { - // fixme: if a list was selected previously, it will steal focus from the input element - var that = $('
') .addClass('OxScreen') .css({ diff --git a/static/js/pandora/utils.js b/static/js/pandora/utils.js index 779ab7ba..d1900460 100644 --- a/static/js/pandora/utils.js +++ b/static/js/pandora/utils.js @@ -832,8 +832,9 @@ pandora.selectList = function() { list.user == pandora.user.username ? 'personal' : 'favorite' ); pandora.$ui.folderList[folder] - .options('selected', [pandora.user.ui._list]) - .gainFocus(); + .options({selected: [pandora.user.ui._list]}); + // Don't steal focus from home screen + $('.OxScreen').length == 0 && pandora.$ui.folderList[folder].gainFocus(); } }); }