controller->GetText( text );
DALI_TEST_CHECK( text.empty() );
+ imfEvent = ImfManager::ImfEventData( ImfManager::COMMIT, "Hello ", 0, 6 );
+ controller->OnImfEvent( imfManager, imfEvent );
+ controller->GetNaturalSize();
+
+ // Check 'Delete All' key which means the input panel send a big range
+ imfEvent = ImfManager::ImfEventData( ImfManager::DELETESURROUNDING, "", -100, 100 );
+ controller->OnImfEvent( imfManager, imfEvent );
+ controller->GetNaturalSize();
+
+ controller->GetText( text );
+ DALI_TEST_EQUALS( "", text, TEST_LOCATION );
+
// Send COMMIT event.
imfEvent = ImfManager::ImfEventData( ImfManager::COMMIT, "Hello ", 0, 6 );
controller->OnImfEvent( imfManager, imfEvent );
Vector<Character>& currentText = mImpl->mModel->mLogicalModel->mText;
CharacterIndex& oldCursorIndex = mImpl->mEventData->mPrimaryCursorPosition;
- CharacterIndex cursorIndex = oldCursorIndex;
+ CharacterIndex cursorIndex = 0;
// Validate the cursor position & number of characters
- if( static_cast< CharacterIndex >( std::abs( cursorOffset ) ) <= cursorIndex )
+ if( ( static_cast< int >( mImpl->mEventData->mPrimaryCursorPosition ) + cursorOffset ) >= 0 )
{
- cursorIndex = oldCursorIndex + cursorOffset;
+ cursorIndex = mImpl->mEventData->mPrimaryCursorPosition + cursorOffset;
}
if( ( cursorIndex + numberOfCharacters ) > currentText.Count() )