Bug 198944

Summary: pressing enter on a button in a message box with a default button should not use the default
Product: [Frameworks and Libraries] kdelibs Reporter: Shriramana Sharma <samjnaa>
Component: generalAssignee: kdelibs bugs <kdelibs-bugs>
Status: RESOLVED DUPLICATE    
Severity: normal CC: mpyne
Priority: NOR    
Version: 4.2   
Target Milestone: ---   
Platform: Ubuntu   
OS: Unspecified   
Latest Commit: Version Fixed In:

Description Shriramana Sharma 2009-07-04 19:55:52 UTC
Version:            (using KDE 4.2.2)
Installed from:    Ubuntu Packages

This is a kdelibs problem because it occurs independently but in the same way in KWrite/Kate/Kolourpaint.

Steps to reproduce:
1. Open one of these applications (or some other KDE 4 application that can create documents). 
2. Make some changes in an empty document or existing document. 
3. Attempt to exit without saving.

What is seen:
I get a dialog box giving options Save, Discard, Cancel. Here Save is the default button. If I use the keyboard to navigate to either Discard or Cancel and press Enter, the appropriate action i.e. either discarding or cancelling does not occur. Instead pressing Enter triggers the default button which is Save and hence I get a Save As dialog (or worse, unwanted changes are saved to an existing file). I have to press Space when focus is on Discard or Cancel to "press" that button from the keyboard.

What is expected:
The default status is given to a button only to indicate that it should be considered pressed when Enter is pressed anywhere in the dialog **when no button is having focus**. When a button is having focus, only that button must be considered pressed when Enter is pressed, not the default button.

Please fix this.
Comment 1 Michael Pyne 2009-07-04 21:24:06 UTC

*** This bug has been marked as a duplicate of bug 190631 ***