Append clipboard text after current pre-edit text 34/49734/3
authorPaul Wisbey <p.wisbey@samsung.com>
Mon, 19 Oct 2015 13:36:06 +0000 (14:36 +0100)
committerPaul Wisbey <p.wisbey@samsung.com>
Mon, 19 Oct 2015 14:00:45 +0000 (15:00 +0100)
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

index bcac025..e990d42 100644 (file)
@@ -1716,8 +1716,14 @@ void Controller::PasteText( const std::string& stringToPaste )
 
 void Controller::PasteClipboardItemEvent()
 {
 
 void Controller::PasteClipboardItemEvent()
 {
+  // Retrieve the clipboard contents first
   ClipboardEventNotifier notifier( ClipboardEventNotifier::Get() );
   std::string stringToPaste( notifier.GetContent() );
   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 );
 }
 
   PasteText( stringToPaste );
 }