'From Cuis 6.0 [latest update: #5303] on 17 June 2022 at 11:44:01 am'!

!HierarchicalListMorph methodsFor: 'events' stamp: 'jmv 6/17/2022 11:22:13'!
focusKeyboardFor: aKeyboardEvent
	(super focusKeyboardFor: aKeyboardEvent) ifTrue: [^ true].
	aKeyboardEvent shiftPressed ifTrue: [
		aKeyboardEvent isArrowLeft
			ifTrue: [ aKeyboardEvent hand keyboardFocusPreviousWithinWindow. ^ true ].
		aKeyboardEvent isArrowRight
			ifTrue: [ aKeyboardEvent hand keyboardFocusNextWithinWindow. ^ true ]].
	aKeyboardEvent isTab ifTrue: [
		aKeyboardEvent shiftPressed
			ifTrue: [ aKeyboardEvent hand keyboardFocusPreviousWithinWindow ]
			ifFalse: [ aKeyboardEvent hand keyboardFocusNextWithinWindow ].
		^ true ].
	^false! !


!PluggableListMorph methodsFor: 'event handling' stamp: 'jmv 6/17/2022 11:43:43'!
keyboardFocusChange: aBoolean
	"The message is sent to a morph when its keyboard focus changes.
	The given argument indicates that the receiver is gaining (versus losing) the keyboard focus.
	In this case, all we need to do is to redraw focus feedback"

	scroller selectedRow =0 ifTrue: [ self navigateToTop ].
	drawKeyboardFocusIndicator
		ifTrue: [self redrawNeeded]
		ifFalse: [
			scroller selectedRow
				ifNotNil: [ :i |
					scroller selectedRow: nil; selectedRow: i ]]! !

