[AT-SPI] TextController: emit characters before delete
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / text / text-controller.cpp
index d683c7f..3035062 100644 (file)
@@ -2648,8 +2648,6 @@ bool Controller::RemoveText( int cursorOffset,
       Vector<Character>::Iterator first = currentText.Begin() + cursorIndex;
       Vector<Character>::Iterator last  = first + numberOfCharacters;
 
-      currentText.Erase( first, last );
-
       if( NULL != mImpl->mEditableControlInterface )
       {
         std::string utf8;
@@ -2657,6 +2655,8 @@ bool Controller::RemoveText( int cursorOffset,
         mImpl->mEditableControlInterface->TextDeleted( cursorIndex, numberOfCharacters, utf8 );
       }
 
+      currentText.Erase( first, last );
+
       // Cursor position retreat
       oldCursorIndex = cursorIndex;