Skip to content

Commit

Permalink
Firefox: prevent currently selected tab from being reset in selector
Browse files Browse the repository at this point in the history
  • Loading branch information
gorhill committed Jul 1, 2015
1 parent f881697 commit 5775fe3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/js/logger-ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -621,18 +621,19 @@ var synchronizeTabIds = function(newTabIds) {
continue;
}
option = select.options[j];
j += 1;
if ( !option ) {
option = document.createElement('option');
select.appendChild(option);
}
option.textContent = newTabIds[tabId];
option.value = classNameFromTabId(tabId);
if ( option.value === selectValue ) {
select.selectedIndex = j;
option.setAttribute('selected', '');
} else {
option.removeAttribute('selected');
}
j += 1;
}
while ( j < select.options.length ) {
select.removeChild(select.options[j]);
Expand Down

0 comments on commit 5775fe3

Please sign in to comment.