Automatically commit text in AbstractButton

Bug #1324955 reported by Michael Sheldon
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Ubuntu UI Toolkit
Fix Released
High
Cris Dywan
ubuntu-keyboard
Invalid
High
Unassigned
ubuntu-ui-toolkit (Ubuntu)
Fix Released
Undecided
Unassigned
Vivid
New
Undecided
Unassigned

Bug Description

At the moment if a user is using predictive text or the pinyin keyboard (which always uses predictive text for Chinese character input) text is placed in to a "pre-edit" buffer prior to being committed to a text area. If text is still in the pre-edit buffer when a button is pressed it can be lost. To avoid this currently apps need to call Qt.inputMethod.commit() when a button is pressed (and a lot of apps currently don't do this), it would be nicer for app developers if this is handled by default in AbstractButton's onPressed.

See also bug 1324296 as the source of this issue.

Tags: rtm14 touch-cn

Related branches

Tim Peeters (tpeeters)
Changed in ubuntu-ui-toolkit:
assignee: nobody → Zsombor Egri (zsombi)
Bill Filler (bfiller)
tags: added: rtm14
Changed in ubuntu-ui-toolkit:
importance: Undecided → High
Changed in ubuntu-keyboard:
importance: Undecided → High
Revision history for this message
Zsombor Egri (zsombi) wrote :

This should be handled more in the OSK itself rather than in the AbstractButton itself... AbstractButton is what its name said: an abstract button. It can be used everywhere, and binding an IM functionality to it just simply makes no sense.

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

A better approach would be to commit the IM buffers when the component looses focus. However I would expect Enter/CR press to do auto-commit the buffer.

Revision history for this message
Michael Sheldon (michael-sheldon) wrote :

Just to update this based on our conversation on IRC:

It doesn't look like it can be reliably handled solely in the keyboard; since all we have to go on are reports of focus changes, which happen asynchronously from the perspective of the keyboard and the app. So the app could have changed pages or processed the text field in some way before we can commit to it.

Rather than just fixing this in AbstractButton, it sounds like the best option would be to have TextFields explicitly call commit on the QML side, when losing focus; this will then block until the text has been committed.

Zsombor Egri (zsombi)
Changed in ubuntu-ui-toolkit:
milestone: none → june-2014
tags: added: touch-cn
Cris Dywan (kalikiana)
Changed in ubuntu-ui-toolkit:
assignee: Zsombor Egri (zsombi) → Christian Dywan (kalikiana)
status: New → Confirmed
Revision history for this message
Cris Dywan (kalikiana) wrote :

Can somebody assist me with testing? I don't know how to type Pinyin, or if it's broken, it only types Latin letters; if I enable word suggestions I get some kanji to select.

Revision history for this message
Cris Dywan (kalikiana) wrote :

Example on how to type Chinese 1. add Chinese input in system settings 2. launch an app that can input text like notes 3. long press global icon 4. select Chinese 5. press 'n' and 'i' 6. 你 should be shown as a word prediction

Cris Dywan (kalikiana)
description: updated
Zsombor Egri (zsombi)
Changed in ubuntu-ui-toolkit:
status: Confirmed → In Progress
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

Fix committed into lp:~ubuntu-sdk-team/ubuntu-ui-toolkit/staging at revision None, scheduled for release in ubuntu-ui-toolkit, milestone Unknown

Changed in ubuntu-ui-toolkit:
status: In Progress → Fix Committed
Zsombor Egri (zsombi)
Changed in ubuntu-ui-toolkit:
status: Fix Committed → Fix Released
Changed in ubuntu-keyboard:
status: New → Invalid
Zsombor Egri (zsombi)
Changed in ubuntu-ui-toolkit (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.