// Get the direction of the first character.
const CharacterDirection firstParagraphDirection = mImpl->mLogicalModel->GetCharacterDirection( 0u );
- const Size& actualSize = mImpl->mVisualModel->GetActualSize();
+ Size actualSize = mImpl->mVisualModel->GetActualSize();
+ if( fabsf( actualSize.height ) < Math::MACHINE_EPSILON_1000 )
+ {
+ // Get the line height of the default font.
+ actualSize.height = mImpl->GetDefaultFontLineHeight();
+ }
// If the first paragraph is right to left swap ALIGN_BEGIN and ALIGN_END;
LayoutEngine::HorizontalAlignment horizontalAlignment = mImpl->mLayoutEngine.GetHorizontalAlignment();
mImpl->ChangeState( EventData::INTERRUPTED ); // State is not INACTIVE as expect to return to edit mode.
// Avoids calling the InsertText() method which can delete selected text
}
- else if ( IsKey( keyEvent, Dali::DALI_KEY_MENU ) )
+ else if ( IsKey( keyEvent, Dali::DALI_KEY_MENU ) ||
+ IsKey( keyEvent, Dali::DALI_KEY_HOME ) )
{
mImpl->ChangeState( EventData::INACTIVE );
- // Menu key behaviour does not allow edit to resume like Power key
+ // Menu/Home key behaviour does not allow edit mode to resume like Power key
// Avoids calling the InsertText() method which can delete selected text
}
else