Bug 313212 - QTextEdit: [enter] and [backspace] duplicate single word lines in ICS
Summary: QTextEdit: [enter] and [backspace] duplicate single word lines in ICS
Status: RESOLVED UNMAINTAINED
Alias: None
Product: Necessitas
Classification: Applications
Component: Android Qt4 (show other bugs)
Version: beta1
Platform: Android Android 4.x
: NOR major
Target Milestone: Unspecified
Assignee: BogDan Vatra
URL:
Keywords: reproducible
Depends on:
Blocks:
 
Reported: 2013-01-14 02:00 UTC by Sebastian
Modified: 2018-09-04 16:17 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sebastian 2013-01-14 02:00:17 UTC
[ENTER]:
If you press <enter> after typing in a *single* word, the next keypress will duplicate this last word into the next line (now: the current line) , the pressed key's character is appended.
If you don't enter a single word but use a space somewhere in middle or at the end of the line, you get the expected behaviour, while the bug is still present when the only space is the *first* character of the line.

Typing [a],[enter],[b],[enter],[c],[enter] will result in
a
ab
abc

--> The behaviour is 100% reproducible on 4.2.1,  it does *not* appear on 2.3.4.

[BACKSPACE]
In a QTextEdit the "backspace" is behaving quite erratic. When the backspace cursor reaches the trailing space of a word (say "foo ") this word is being duplicated ("foofoo"). The next backspaces will erase the last foo: "foofo", "foof" "foo" while the following wil result in a partial duplication: "foofo".
The whole process as an overview:
foo
foofoo
foofo
foof
foo
fofo
fof
fo
ff
f
--> The behaviour is also 100% reproducible on 4.2.1,  it does *not* appear on 2.3.4. 

Reproducible: Always

Steps to Reproduce:
[ENTER]:
1. Create a QTextEdit
2. Type "Hello" into it
3. Press [enter]
4. Enter "world"
[BACKSPACE]:
1. Create a QTextEdit
2. Type "Hello" into it
3. Press [enter]
4. Press [backspace]
Actual Results:  
[Enter]:
Hello
Helloworld
[BACKSPACE]:
Hello
Hell

Expected Results:  
[Enter]:
Hello
world
[BACKSPACE]:
Hello

I use the current Necessitas (2.5.84) on a Windows XP VM and deploy to Emulator, Samsung Galaxy 2 (Android 2.3.4) and Nexus 10 (Android 4.2.1). The problem occurs only on the Nexus.
Comment 1 Sebastian 2013-01-14 03:16:30 UTC
I have created a minimal example on www.classintouch.de/TextEditBug.zip - but all you need for reproducing is actually just any QTextBox out of the... ahem... box.
Comment 2 Sebastian 2013-01-17 20:52:37 UTC
This is quite obviously linked to https://bugs.kde.org/show_bug.cgi?id=307748, as all those symptoms are *gone* when predictive Text is switched off. I have not marked it a duplicate, because it is a different QWidget and so it might happen, that we "remove the cause but not the symptom" :-)
Comment 3 jenna 2013-01-22 06:55:20 UTC
I get this issue as well using the stock android keyboard on a nexus7 with android 4.2.1.
Comment 4 Taiko 2013-02-06 14:06:06 UTC
I can confirm this issue on a Nexus 10 with android 4.2.1 and stock keyboard. Is it possible to disable predictive Text for Necessitas programmatically to work around this bug?
Comment 5 Taiko 2013-02-06 14:08:19 UTC
*** This bug has been confirmed by popular vote. ***
Comment 6 Sebastian 2013-02-06 16:36:07 UTC
@Taiko: 
Yes, it is possible to programmatically disable predictive text entries. I don't know a way to do that globally, but you can do it on a per-widget basis (or by subclassing those widgets and use those subclasses throughout the program, if you prefer). 

Example code: 

QLineEdit* lineEdit;
Qt::InputMethodHints currentHints=lineEdit->inputMethodHints();
lineEdit->setInputMethodHints(currentHints|Qt::ImhNoPredictiveText);

This workaround avoids all other "predictive text" related problems, too, of course.
Comment 7 Andrew Crouthamel 2018-09-04 16:17:06 UTC
Hello! Sorry to be the bearer of bad news, but this project has been unmaintained for many years and I will be closing this bug.