Bug 1320564 - Fix the default value logic for "selected" when creating a new tab. r=sebastian

The idea is that cancelling edit mode when opening a new tab implies that we want to select it as well, otherwise we wouldn't have to cancel edit mode in the first place.

MozReview-Commit-ID: Gova1ymzlHn

--HG--
extra : rebase_source : a1d957de82a5e1ec9bf9162e1f01641e34e16ab4
This commit is contained in:
Jan Henning 2016-11-27 18:46:53 +01:00
Родитель 1e1279c661
Коммит 0dcdc37035
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -3495,7 +3495,8 @@ Tab.prototype = {
parentId: ("parentId" in aParams) ? aParams.parentId : -1,
tabIndex: ("tabIndex" in aParams) ? aParams.tabIndex : -1,
external: ("external" in aParams) ? aParams.external : false,
selected: ("selected" in aParams || aParams.cancelEditMode === true) ? aParams.selected : true,
selected: ("selected" in aParams || aParams.cancelEditMode === true)
? aParams.selected !== false || aParams.cancelEditMode === true : true,
cancelEditMode: aParams.cancelEditMode === true,
title: truncate(title, MAX_TITLE_LENGTH),
delayLoad: aParams.delayLoad || false,