return ( mEventData && mEventData->mIsShowingPlaceholderText );
}
+ /**
+ * @brief Helper to check whether active place-holder text is available.
+ */
+ bool IsFocusedPlaceholderAvailable() const
+ {
+ return ( mEventData && !mEventData->mPlaceholderTextActive.empty() );
+ }
+
bool IsShowingRealText() const
{
return ( !IsShowingPlaceholderText() &&
{
mImpl->ChangeState( EventData::INACTIVE );
- if( mImpl->IsShowingPlaceholderText() )
+ if( !mImpl->IsShowingRealText() )
{
// Revert to regular placeholder-text when not editing
ShowPlaceholderText();
else if( EventData::EDITING != mImpl->mEventData->mState &&
EventData::EDITING_WITH_GRAB_HANDLE != mImpl->mEventData->mState )
{
+ if( mImpl->IsShowingPlaceholderText() && ! mImpl->IsFocusedPlaceholderAvailable() )
+ {
+ // Hide placeholder text
+ ResetText();
+ }
// Show cursor on first tap
mImpl->ChangeState( EventData::EDITING );
relayoutNeeded = true;