Bug 47273
Summary: | [Qt][S60] Junk text is shown in textbox when text is highlighted | ||
---|---|---|---|
Product: | WebKit | Reporter: | Ankur Baranwal <ankur.baranwal> |
Component: | WebKit Qt | Assignee: | QtWebKit Unassigned <webkit-qt-unassigned> |
Status: | RESOLVED DUPLICATE | ||
Severity: | Major | CC: | amit.rai, ankur.baranwal, kling, neelkanth.nidgundi, pragya.kaundal, ramesh.hegde, robert, suresh.voruganti |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | S60 Hardware | ||
OS: | S60 3rd edition | ||
Bug Depends on: | 39625 | ||
Bug Blocks: |
Ankur Baranwal
Qt: 4.7
QtWebkit: 2.1
OS: Symbian^3
Steps to reproduce the error -
1. Open www.google.com in Anomaly Browser.
2. Select the search text box. Virtual keypad opens.
3. Enter "hello" and highlight the word.
4. Now press ok button on virtual keypad.
Expected Result -
After step 4, "hello" word is displayed in text box.
Actual Result -
After step 4, "hellohello" is displayed in the text box.
Additional Info -
This bug is not reproducible on native applications and in sample Qt application.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Ramesh
This is a Blocker issue for us.Can you raise this priority to P0-Blocker and work on it?
Suresh Voruganti
This error is moved from wrt team Boston Defect -6537
and the analysis in 6537 doesnt prove that it is Qtwebkit error. Wrt team need to analyse and prove that it is Qtwebkit error, so ignoring the error as now. Re-open the error after analysis if the problem seems to be in QtWebkit.
Ankur Baranwal
This bug is reproducible using QtTestBrowser.
I debugged this further and found that following piece of code which, it seems, was introduced in Webkit2.1. Whenever control passes through this code, text is getting repeated.
void QWebPagePrivate::inputMethodEvent(QInputMethodEvent *ev)
{
...
...
#if QT_VERSION >= 0x040600
if (hasSelection) {
QString text = (renderTextControl) ? QString(renderTextControl->text()) : QString();
if (preedit.isEmpty() && selection.start + selection.length > 0)
preedit = text;
editor->setComposition(preedit, underlines,
(selection.length < 0) ? selection.start + selection.length : selection.start,
(selection.length < 0) ? selection.start : selection.start + selection.length);
} else
#endif
...
...
}
It seems text is getting appended to older string every time in QString(renderTextControl->text()).
Also, this happens even if we simply click on empty area in the virtual keypad.
This behavior is not seen with the Address bar text field. It happens only within the html text field.
Andreas Kling
CC'ing Robert since he introduced this code block in <http://trac.webkit.org/changeset/58218>
Suresh Voruganti
Adding dependency to 39121 as it is top issue for services.
Robert Hogan
(In reply to comment #4)
> CC'ing Robert since he introduced this code block in <http://trac.webkit.org/changeset/58218>
What we need to do is outlined by Simon in:
https://bugs.webkit.org/show_bug.cgi?id=39625#c15
Unfortunately I never got round to implementing it. I can look at it this weekend, but if the priority needs to be higher then someone should do it before me.
Robert Hogan
There is a patch up for review at:
https://bugs.webkit.org/show_bug.cgi?id=39625
Let me know if it works for you.
Also, as someone who only has the unit tests to go on, can you provide a unit test for this case similar to those in tst_qwebpage?
neelkanth
Please provide the LE?
Andreas Kling
(In reply to comment #8)
> Please provide the LE?
Please refrain from using Nokia jargon on public issue trackers.
Robert Hogan
Hi Ankur,
Is this fixed for you in trunk now?
Ankur Baranwal
Hi Robert, the problem is fixed in trunk now. Thanks.
Suresh Voruganti
Duplicating this error to 39625
as the patch for 39625 fixed this issue.
*** This bug has been marked as a duplicate of bug 39625 ***