find a default focus item, when a focusScope/tabFence control ( usually
a popup ) gets the focus - to be on the internal tab chain.
This commit is contained in:
parent
3837205847
commit
19c0e43e5c
@ -1049,6 +1049,23 @@ bool QskControl::event( QEvent* event )
|
||||
|
||||
break;
|
||||
}
|
||||
case QEvent::FocusIn:
|
||||
{
|
||||
if ( isFocusScope() && isTabFence() && ( scopedFocusItem() == nullptr ) )
|
||||
{
|
||||
/*
|
||||
When receiving the focus we need to have a focused
|
||||
item, so that the tab focus chain has a starting point.
|
||||
*/
|
||||
|
||||
if ( auto focusItem = nextItemInFocusChain( true ) )
|
||||
{
|
||||
if ( qskIsAncestorOf( this, focusItem ) )
|
||||
focusItem->setFocus( true );
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
switch( eventType )
|
||||
|
Loading…
x
Reference in New Issue
Block a user