From f39a0555fc2897d94a4984712e219e452bc96d70 Mon Sep 17 00:00:00 2001
From: Paul Wisbey
Date: Mon, 19 Oct 2015 14:36:06 +0100
Subject: [PATCH 1/1] Append clipboard text after current pre-edit text
Issue description:
1) Configure keyboard to show clipboard item
2) Type some text without pressing space
3) Use the keyboard clipboard short-cut to paste test whilst pre-text is shown
4) Then when the next character is typed, the pre-edit text reappears
Solution is to stop prediction before pasting (appending instead of replacing)
Change-Id: Ibd661e2f4d377c8333711e97c3c7a751caf8c15f
---
dali-toolkit/internal/text/text-controller.cpp | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/dali-toolkit/internal/text/text-controller.cpp b/dali-toolkit/internal/text/text-controller.cpp
index bcac025..e990d42 100644
--- a/dali-toolkit/internal/text/text-controller.cpp
+++ b/dali-toolkit/internal/text/text-controller.cpp
@@ -1716,8 +1716,14 @@ void Controller::PasteText( const std::string& stringToPaste )
void Controller::PasteClipboardItemEvent()
{
+ // Retrieve the clipboard contents first
ClipboardEventNotifier notifier( ClipboardEventNotifier::Get() );
std::string stringToPaste( notifier.GetContent() );
+
+ // Commit the current pre-edit text; the contents of the clipboard should be appended
+ mImpl->ResetImfManager();
+
+ // Paste
PasteText( stringToPaste );
}
--
2.7.4