diff --git a/chrome/chromeFiles/content/scholar/itemPane.js b/chrome/chromeFiles/content/scholar/itemPane.js index 5a765dc509..75aba60c45 100644 --- a/chrome/chromeFiles/content/scholar/itemPane.js +++ b/chrome/chromeFiles/content/scholar/itemPane.js @@ -108,7 +108,7 @@ var ScholarItemPane = new function() break; } - if (boxes.length==1) + if (boxes && boxes.length==1) { boxes[0].inputField.blur(); } diff --git a/chrome/chromeFiles/content/scholar/xpcom/itemTreeView.js b/chrome/chromeFiles/content/scholar/xpcom/itemTreeView.js index ac934bfba8..ddb0654a25 100644 --- a/chrome/chromeFiles/content/scholar/xpcom/itemTreeView.js +++ b/chrome/chromeFiles/content/scholar/xpcom/itemTreeView.js @@ -176,6 +176,10 @@ Scholar.ItemTreeView.prototype.notify = function(action, type, ids) if(action == 'add') { if (ids.length===1){ + // Reset to Info tab + this._treebox.treeBody.ownerDocument. + getElementById('scholar-view-tabs').selectedIndex = 0; + this.selectItem(ids[0]); } }