Bug 70478 - [test case] Pressing space to check a checkbox will select checkbox and also page down (regression)
Summary: [test case] Pressing space to check a checkbox will select checkbox and also ...
Status: CLOSED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: khtml forms (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-15 07:53 UTC by Sean Lynch
Modified: 2018-03-25 17:50 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
testcase (441 bytes, text/html)
2003-12-15 07:53 UTC, Sean Lynch
Details
Patch (1.37 KB, patch)
2004-01-15 00:21 UTC, David Faure
Details
Doh! (1.33 KB, patch)
2004-01-15 20:16 UTC, David Faure
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sean Lynch 2003-12-15 07:53:14 UTC
Version:           unknown (using KDE 3.1.94 (CVS >= 20031206), compiled sources)
Compiler:          gcc version 3.3.1 (Mandrake Linux 9.2 3.3.1-2mdk)
OS:          Linux (i686) release 2.4.22-10mdk

If you use the space bar to change the status of a checkbox, the checkbox will be checked/unchecked, as well as the page scrolling now.  I've attached a testcast (with alot of br tags to make sure the page has a scrollbar).  Just click on the check box once, the press space to change the status, and have have the page scrolled down.
Comment 1 Sean Lynch 2003-12-15 07:53:46 UTC
Created attachment 3713 [details]
testcase
Comment 2 Thiago Macieira 2003-12-15 17:12:16 UTC
Confirmed. I don't believe this to be the intended behaviour. Hence, it's a bug.
Comment 3 Stephan Kulow 2004-01-14 17:32:30 UTC
just tested 3.1 without success
Comment 4 David Faure 2004-01-14 19:13:15 UTC
Hmm, the bug is in QCheckBox IMHO.
It calls e->ignore() on the Key_Space keyevent after calling setDown(),
so the event is sent to the parent widget.
Comment 5 David Faure 2004-01-14 21:27:11 UTC
I meant the key handling in QButton (from which QCheckBox derives)
Comment 6 David Faure 2004-01-15 00:21:31 UTC
Created attachment 4175 [details]
Patch

My investigation was completely wrong... The bug is in KHTML.
When handling an event in a form element, we need to set the event to "default
handled" so that KHTMLView knows that it shouldn't do the default handling
itself (e.g. scrolling down, for the space key).
Comment 7 David Faure 2004-01-15 20:16:33 UTC
Created attachment 4183 [details]
Doh!
Comment 8 David Faure 2004-01-19 15:20:49 UTC
Applied to CVS HEAD
Comment 9 Ingo Klöcker 2004-02-17 14:24:24 UTC
Please backport the fix.