Summary: | regression in khtml forms when using enter key to select item from completion list | ||
---|---|---|---|
Product: | [Applications] konqueror | Reporter: | Andrea Iacovitti <aiacovitti> |
Component: | khtml forms | Assignee: | Konqueror Developers <konq-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | kde, kde, kevin.kofler, sebastian.radish |
Priority: | NOR | ||
Version: | 4.7.0 | ||
Target Milestone: | --- | ||
Platform: | Unlisted Binaries | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 4.7.1 | |
Sentry Crash Report: | |||
Attachments: | klineedit patch |
Description
Andrea Iacovitti
2011-07-17 11:32:21 UTC
Possible fix: --- render_form.cpp~ +++ render_form.cpp @@ -1081,7 +1081,7 @@ // don't submit the form when return was pressed in a completion-popup KCompletionBox *box = widget()->completionBox(false); - if ( box && box->isVisible() && box->currentRow() != -1 ) { + if ( box && box->currentRow() != -1 ) { box->hide(); return; } It seems that newer klineedit first hides completionBox and afterwards emits returnPressed. This results in box->isVisible() to be always false in RenderLineEdit::slotReturnPressed() in render_form.cpp, then form is immediately submitted. With the above patch if completion box appears while editing input text but you ignore it and press enter the form is immediately submitted (like e.g Firefox do) This also affects KDE 4.6.5, in my case on Kubuntu 11.04. (In reply to comment #2) > This also affects KDE 4.6.5, in my case on Kubuntu 11.04. Sorry, can't confirm... (In reply to comment #3) > (In reply to comment #2) > > This also affects KDE 4.6.5, in my case on Kubuntu 11.04. > Sorry, can't confirm... My version information from Konqueror (64-bit) says: Konqueror Version 4.6.5 (4.6.5) Using KDE Development Platform 4.6.5 (4.6.5) If I hit a character to bring up some entries for a form, select one then hit enter it completes correctly, then when I hit TAB to go to the next part of the form only the bit I had typed myself remains in the box. Created attachment 62503 [details] klineedit patch Instead of modify khtml code (comment #1), try to restore klineedit behavior as before commit 2ea274cd. (In reply to comment #4) > If I hit a character to bring up some entries for a form, select one then hit > enter it completes correctly, then when I hit TAB to go to the next part of the > form only the bit I had typed myself remains in the box. What you described has nothing to do with this ticket, isn't it? There is an already reported bug for that (#277457) Git commit 0f9004209464f2bdfbef9031836ed72c63f52887 by Andrea Iacovitti. Committed on 04/08/2011 at 16:54. Pushed by aiacovitti into branch 'KDE/4.7'. Restore klineedit behavior as before kdelibs commit 2ea274cd. Fixed khtml form regression where choosing an item in completion box by pressing Enter key immediately submits the form instead of just filling the input text field. BUG: 277943 FIXED-IN: 4.7.1 M +7 -4 kdeui/widgets/klineedit.cpp http://commits.kde.org/kdelibs/0f9004209464f2bdfbef9031836ed72c63f52887 Git commit b57c0173480338ef67fd17d573278f5e596bf4fc by Andrea Iacovitti. Committed on 04/08/2011 at 16:54. Pushed by aiacovitti into branch 'master'. Restore klineedit behavior as before kdelibs commit 2ea274cd. Fixed khtml form regression where choosing an item in completion box by pressing Enter key immediately submits the form instead of just filling the input text field. BUG: 277943 FIXED-IN: 4.7.1 (cherry picked from commit 0f9004209464f2bdfbef9031836ed72c63f52887) M +7 -4 kdeui/widgets/klineedit.cpp http://commits.kde.org/kdelibs/b57c0173480338ef67fd17d573278f5e596bf4fc (In reply to comment #6) > What you described has nothing to do with this ticket, isn't it? > There is an already reported bug for that (#277457) Apologies, I must have misread the original report! :-( |