copy/paste does not work correctly with text fields

Bug #1367814 reported by Bill Filler
38
This bug affects 7 people
Affects Status Importance Assigned to Milestone
Ubuntu UI Toolkit
Invalid
Critical
Zsombor Egri
qtmir (Ubuntu)
Critical
Daniel d'Andrada
qtubuntu (Ubuntu)
Undecided
Unassigned

Bug Description

using krilling RTM build
ubuntu-ui-toolkit 1.1.1214+14.10.20140826-0ubuntu1

There are multiple bugs I'm seeing trying to use copy/paste. I will file a seperate one for each
1) open messaging-app (or calender-app or browser app)
2) create a new text message
3) type "this is great"
4) double click on "great"
5) press and hold to get popup menu
6) select "copy"
7) now click somewhere else in the text field
8) long press to get the popup menu

Expected result:
- Paste button should be enabled and I should be able to paste the text I just copied

Actual result:
- Paste button is never enabled.

You can try the same think in browser url field or in calendar, create a new event in the event description field

Related branches

Bill Filler (bfiller)
Changed in ubuntu-ui-toolkit:
importance: Undecided → Critical
assignee: nobody → Zsombor Egri (zsombi)
tags: added: rtm14
Revision history for this message
kevin gunn (kgunn72) wrote :

fwiw in terms of debug, this does seem to work as expected in the Notepad application.

Revision history for this message
Zsombor Egri (zsombi) wrote :

From what I can tell is that the feature works on desktop, and doesn't work on the device. Text input context menu items are enabled/disabled by an API provided by the Qt upstream. This detects whether there is anything in the clipboard to paste. If there's nothing, it will be disabled.

The clipboard from the toolkit has not been touched since 13.10, and suddenly stopped working. So I suspect the issue is in QtUbuntu.

Bill Filler (bfiller)
Changed in qtubuntu:
importance: Undecided → Critical
kevin gunn (kgunn72)
Changed in qtubuntu:
assignee: nobody → Daniel d'Andrada (dandrader)
tags: added: touch-2014-10-02
kevin gunn (kgunn72)
tags: added: touch-2014-09-25
removed: touch-2014-10-02
Changed in qtubuntu:
status: New → In Progress
Revision history for this message
Daniel d'Andrada (dandrader) wrote :

The clipboard provided by unity8 through the mir protocol and socket ir working fine. It's copying content and pasting as requested by client apps.
webbrowser is able to copy content over to the clipboard. But somehow that toolbar that pops up when you long press a text field doesn't recognize that there's content in the clipboard. I can see it requests the content from the clipboard (in order to check if there's anything in the clipboard I guess) but it's still greyed out.

The notes app is able to paste just fine though. But it uses a different component for the paste function. So the problem is either in that text field toolbar code or in whatever api it uses.

Revision history for this message
Zsombor Egri (zsombi) wrote :

The context menu that pops up (and looks like a toolbar :) ) uses QtQuick TextField's canPaste to see whether is something in clipboard to paste. If the MIME type is not suitable to paste, it will return false. The code doing the job is here http://bazaar.launchpad.net/~ubuntu-sdk-team/ubuntu-ui-toolkit/trunk/view/head:/modules/Ubuntu/Components/TextInputPopover.qml#L51

I repeat, the same code works on desktop.

Revision history for this message
kevin gunn (kgunn72) wrote :

@dandrader is this a matter of comparing the qtmir to qt pluging for x ?

Revision history for this message
Daniel d'Andrada (dandrader) wrote :

> @dandrader is this a matter of comparing the qtmir to qt pluging for x ?

Actually there seems to be something odd happening in the google protobuf communication (which is what mir uses). The very first time the client requests for the clipboard content unity8 returns the correct content but the client gets nothing on the other side (or so says google protobuf). So it thinks the clipboard is empty. But if it requests again later on the content arrives as expected. Notes app works because it queries the clipboard content at different moments.

Also if you just ignore canPaste() (wich was set according to the very first clipboard request that's done early on) and don't grey out the component it pastes fine as well (as later clipboard requests return the content normally).

Changed in ubuntu-ui-toolkit:
status: New → Invalid
affects: qtubuntu → qtmir
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in qtmir (Ubuntu):
status: New → Confirmed
Changed in qtubuntu (Ubuntu):
status: New → Confirmed
kevin gunn (kgunn72)
tags: added: touch-2014-10-02
removed: touch-2014-09-25
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package qtubuntu - 0.60+14.10.20141001.3-0ubuntu1

---------------
qtubuntu (0.60+14.10.20141001.3-0ubuntu1) utopic; urgency=low

  [ Zsombor Egri ]
  * Handle PasswordMaskDelay. (LP: #1237614)

  [ Robert Carr ]
  * Support mir restored surface state as a way to leave fullscreen.
    (LP: #1194550)

  [ Daniel d'Andrada ]
  * Use the global clipboard from D-Bus (LP: #1367814)
 -- Ubuntu daily release <email address hidden> Wed, 01 Oct 2014 17:20:53 +0000

Changed in qtubuntu (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package qtmir - 0.4.3+14.10.20141001.5-0ubuntu1

---------------
qtmir (0.4.3+14.10.20141001.5-0ubuntu1) utopic; urgency=low

  [ Daniel d'Andrada ]
  * CONFIG+=no_tests to avoid building the tests and therefore speed up
    the build
  * Provide a global clipboard via D-Bus (LP: #1367814)

  [ josharenson ]
  * Remove check to see if application is already focused before
    focusing.

  [ Robert Carr ]
  * MirSurfaceItem::consume Set motion event tooltypes based on
    QTouchPoints (LP: #1371282)

  [ Gerry Boland ]
  * Fix AppMan handling Upstart resuming a Stopped application
 -- Ubuntu daily release <email address hidden> Wed, 01 Oct 2014 18:43:00 +0000

Changed in qtmir (Ubuntu):
status: Confirmed → Fix Released
kevin gunn (kgunn72)
Changed in qtmir:
status: In Progress → Fix Released
Michał Sawicz (saviq)
Changed in qtmir (Ubuntu):
assignee: nobody → Daniel d'Andrada (dandrader)
importance: Undecided → Critical
no longer affects: qtmir
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers