- }
- else if( mImpl->mEventData )
- {
- SelectEvent( x, y, false );
+ else
+ {
+ // The 1st long-press on inactive text-field is treated as tap
+ if( EventData::INACTIVE == mImpl->mEventData->mState )
+ {
+ mImpl->ChangeState( EventData::EDITING );
+
+ Event event( Event::TAP_EVENT );
+ event.p1.mUint = 1;
+ event.p2.mFloat = x;
+ event.p3.mFloat = y;
+ mImpl->mEventData->mEventQueue.push_back( event );
+
+ mImpl->RequestRelayout();
+ }
+ else
+ {
+ // Reset the imf manger to commit the pre-edit before selecting the text.
+ mImpl->ResetImfManager();
+
+ SelectEvent( x, y, false );
+ }
+ }