src/vs/base/browser/ui/actionbar/actionbar.ts/ActionBar/updateFocus
class ActionBar:	protected updateFocus(fromRight?: boolean, preventScroll?: boolean): void {
		if (typeof this.focusedItem === 'undefined') {
			this.actionsList.focus({ preventScroll });
		}

		for (let i = 0; i < this.viewItems.length; i++) {
			const item = this.viewItems[i];
			const actionViewItem = item;

			if (i === this.focusedItem) {
				let focusItem = true;

				if (!types.isFunction(actionViewItem.focus)) {
					focusItem = false;
				}

				if (this.options.focusOnlyEnabledItems && types.isFunction(item.isEnabled) && !item.isEnabled()) {
					focusItem = false;
				}

				if (focusItem) {
					actionViewItem.focus(fromRight);
				} else {
					this.actionsList.focus({ preventScroll });
				}
			} else {
				if (types.isFunction(actionViewItem.blur)) {
					actionViewItem.blur();
				}
			}
		}
	}