Bug 152739 - Entering text on forms makes text be entered in the non current form
Summary: Entering text on forms makes text be entered in the non current form
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: khtml forms (show other bugs)
Version: 4.0
Platform: Compiled Sources Linux
: NOR grave
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
: 151940 152617 152651 152751 152798 153063 153141 153494 153633 153705 153707 153808 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-11-22 22:41 UTC by Albert Astals Cid
Modified: 2007-12-28 01:13 UTC (History)
13 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
patch for review. (2.71 KB, patch)
2007-12-04 11:29 UTC, Germain Garand
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Albert Astals Cid 2007-11-22 22:41:36 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources

How to reproduce:
 * Go to https://bugs.kde.org/query.cgi?GoAheadAndLogIn=1
 * I start to write my mail (tsdgeos...) on the mail field
 * I press t
 * t is entered on the correct form
 * A completion box appears
 * any subsequent key press is entered in the password field
Comment 1 Maksim Orlovich 2007-11-23 00:23:06 UTC
*** Bug 152751 has been marked as a duplicate of this bug. ***
Comment 2 Maksim Orlovich 2007-11-23 20:42:15 UTC
*** Bug 152798 has been marked as a duplicate of this bug. ***
Comment 3 Maksim Orlovich 2007-11-28 19:59:50 UTC
*** Bug 153063 has been marked as a duplicate of this bug. ***
Comment 4 Germain Garand 2007-12-04 09:32:40 UTC
Stems from a bug in QWidget::setParent.

Whilst the documentation says:
  "If the new parent widget is in the same window as the old parent, setting
   the parent doesn't change the tab order or keyboard focus."
the actual code doesn't check for that condition at all. It just clears the focus if the moved child is an ancestor of the focus widget.

I'll have to add a virtual to KCompletionBox to fix that one as there's no turning around that.

Not really a bad thing anyway as our derived class will end up less of a hack, but BIC so will have to wait until next monday.

Comment 5 Germain Garand 2007-12-04 11:29:11 UTC
Created attachment 22330 [details]
patch for review.

Instead of reimplementing KCompletionBox::popup(), which proved not really
possible with even the heaviest hackery, add a new
KCompletionBox::globalPositionHint() virtual providing the desired global
placement of the popup. Reimplement that in our subclass.
Comment 6 Pino Toscano 2007-12-05 17:48:30 UTC
*** Bug 153494 has been marked as a duplicate of this bug. ***
Comment 7 Albert Astals Cid 2007-12-06 17:05:43 UTC
I confirm the patch solves my problems although i'm not sure we allow BIC changes at this stage...
Comment 8 Maksim Orlovich 2007-12-08 20:00:13 UTC
*** Bug 153633 has been marked as a duplicate of this bug. ***
Comment 9 Maksim Orlovich 2007-12-08 20:42:45 UTC
*** Bug 152617 has been marked as a duplicate of this bug. ***
Comment 10 Germain Garand 2007-12-09 02:26:25 UTC
*** Bug 153705 has been marked as a duplicate of this bug. ***
Comment 11 Maksim Orlovich 2007-12-09 04:17:09 UTC
*** Bug 153707 has been marked as a duplicate of this bug. ***
Comment 12 Germain Garand 2007-12-10 17:21:58 UTC
SVN commit 746917 by ggarand:

fix focus jumping on linedit completion.

QWidget::setParent is supposed to let the focus unchanged within
the same window but this is not what happens in practice.

Makes hacking KCompletionBox::popup to suit our needs hardly possible.

Instead we'll use a new virtual providing the preferred global position
for the completion box.

showstopper
BUG: 152739


 M  +8 -1      kdeui/widgets/kcompletionbox.cpp  
 M  +6 -0      kdeui/widgets/kcompletionbox.h  
 M  +4 -18     khtml/rendering/render_form.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=746917
Comment 13 Tommi Tervo 2007-12-13 13:00:43 UTC
*** Bug 153141 has been marked as a duplicate of this bug. ***
Comment 14 Germain Garand 2007-12-13 18:31:47 UTC
*** Bug 152651 has been marked as a duplicate of this bug. ***
Comment 15 Maksim Orlovich 2007-12-28 01:12:31 UTC
*** Bug 151940 has been marked as a duplicate of this bug. ***
Comment 16 Maksim Orlovich 2007-12-28 01:13:41 UTC
*** Bug 153808 has been marked as a duplicate of this bug. ***