Change-Id: I65e456dcea2011a4bdfe4db2afe8cc072107e50e
{
DALI_ASSERT_DEBUG( !mIsWaitingKeyboardFocusChangeCommit && "Calling this function in the PreFocusChangeSignal callback?" );
{
DALI_ASSERT_DEBUG( !mIsWaitingKeyboardFocusChangeCommit && "Calling this function in the PreFocusChangeSignal callback?" );
- return DoSetCurrentFocusActor(actor.GetId());
+ return DoSetCurrentFocusActor( actor.GetId() );
void KeyboardFocusManager::OnTouched(const TouchEvent& touchEvent)
{
void KeyboardFocusManager::OnTouched(const TouchEvent& touchEvent)
{
- // Clear the focus when user touch the screen
- ClearFocus();
+ // Clear the focus when user touch the screen.
+ // We only do this on a Down event, otherwise the clear action may override a manually focused actor.
+ if( ( touchEvent.GetPointCount() < 1 ) || ( touchEvent.GetPoint( 0 ).state == TouchPoint::Down ) )
+ {
+ ClearFocus();
+ }
}
Toolkit::KeyboardFocusManager::PreFocusChangeSignalType& KeyboardFocusManager::PreFocusChangeSignal()
}
Toolkit::KeyboardFocusManager::PreFocusChangeSignalType& KeyboardFocusManager::PreFocusChangeSignal()