X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ftext%2Ftext-controller.cpp;h=1bb0fed78b8bc397a58387d99e68f08526d3cfd6;hp=831fd9cf83737e4a0442bd9c4efd612a85b669fc;hb=f4c3e2927fdee2fa02fd414aaa8cee874fcf839e;hpb=fbb1f2f599b2fc1a54b327039ce6111f4b4ba4cf diff --git a/dali-toolkit/internal/text/text-controller.cpp b/dali-toolkit/internal/text/text-controller.cpp index 831fd9c..1bb0fed 100644 --- a/dali-toolkit/internal/text/text-controller.cpp +++ b/dali-toolkit/internal/text/text-controller.cpp @@ -1711,17 +1711,14 @@ bool Controller::KeyEvent( const Dali::KeyEvent& keyEvent ) { textChanged = BackspaceKeyEvent(); } - else if( IsKey( keyEvent, Dali::DALI_KEY_POWER ) ) - { - 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_POWER ) || + IsKey( keyEvent, Dali::DALI_KEY_MENU ) || IsKey( keyEvent, Dali::DALI_KEY_HOME ) ) { + // Power key/Menu/Home key behaviour does not allow edit mode to resume. mImpl->ChangeState( EventData::INACTIVE ); - // Menu/Home key behaviour does not allow edit mode to resume like Power key - // Avoids calling the InsertText() method which can delete selected text + + // This branch avoids calling the InsertText() method of the 'else' branch which can delete selected text. } else if( Dali::DALI_KEY_SHIFT_LEFT == keyCode ) {