 		for item, index in @__body.DOM.children
 			if CUI.dom.hasClass(item, CUI.defaults.class.Button.defaults.active_css_class)
 				return index
-
-		return -1
 
 CUI.ready =>
 	CUI.Events.registerEvent

							CUI.scheduleCallback(ms: 200, call: preSelectByKeyword)
				return

	__preSelectByKeyword: (keyword) ->
		elementMatches = (element) =>
			(element instanceof CUI.Button or element instanceof CUI.Label) and element.getText()?.startsWithIgnoreCase(keyword)

		nextIndex = @__preActiveIndex + 1
		nextElement = @__getItemByIndex(nextIndex)
		if elementMatches(nextElement)
			@__preActivateItemByIndex(nextIndex)
			return

		for item, index in @__body?.DOM.children
			element = CUI.dom.data(item, "element")
			if elementMatches(element)
				@__preActivateItemByIndex(index)
				break
		return

	__activatePreSelected: (event) ->
		itemToActivate = @__getItemByIndex(@__preActiveIndex)
		if itemToActivate instanceof CUI.Button
			itemToActivate.onClickAction(event)
			CUI.dom.removeClass(itemToActivate, CUI.defaults.class.Button.defaults.active_css_class)

	__preActivateNextItem: ->
		@__preActivateItemByIndex(@__preActiveIndex + 1)

	__preActivatePreviousItem: ->
		@__preActivateItemByIndex(@__preActiveIndex - 1)

	__preActivateItemByIndex: (newPreActiveIndex) ->
		itemToPreActivate = @__getItemByIndex(newPreActiveIndex)
		if itemToPreActivate instanceof CUI.Button
			@__deselectPreActivated()
			@__preActiveIndex = newPreActiveIndex
			CUI.dom.addClass(itemToPreActivate, CUI.defaults.class.Button.defaults.active_css_class)
			CUI.dom.scrollIntoView(itemToPreActivate)

	__deselectPreActivated: ->
		previousItemSelected = @__getItemByIndex(@__preActiveIndex)
		if previousItemSelected instanceof CUI.Button
			CUI.dom.removeClass(previousItemSelected, CUI.defaults.class.Button.defaults.active_css_class)

	__getItemByIndex: (index) ->
		if not @__body or CUI.util.isNull(index) or index < 0
			return

		children = Array::filter.call(@__body.DOM.children, (item) =>
			element = CUI.dom.data(item, "element")
			return element instanceof CUI.Button or element instanceof CUI.DataField or element instanceof CUI.Label
		)

		item = children[index]
		return CUI.dom.data(item, "element")

	__initPreActiveIndex: ->
		if @__active_idx

		@append(@__body, "center")

		if @_keyboardControl
			@__initListeners()

	initOpts: ->
		super()
