Bug 369390

Summary: In file preview, pressing enter closes preview
Product: [Applications] ark Reporter: G360 <kde-bugs.9ek5t>
Component: generalAssignee: Ragnar Thomsen <rthomsen6>
Status: RESOLVED FIXED    
Severity: normal CC: rakuco, rthomsen6
Priority: NOR    
Version: 16.08.1   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In: 16.08.2
Sentry Crash Report:

Description G360 2016-09-26 19:41:30 UTC
After opening a compressed archive with Ark, there is the possibility to preview a file, and you can search a string with Ctrl+F.  Upon pressing key Enter, the preview is closed, which is very much unexpected. Enter should search the next string, the same say as Kate does.

Reproducible: Always

Steps to Reproduce:
1. Open archive in ark
2. Open some file for preview.
3. Search a string with Ctrl+F
4. Press enter

Actual Results:  
The preview is closed.

Expected Results:  
Show the next text result.
Comment 1 G360 2016-09-26 21:04:37 UTC
Bug 369401 might be related to this issue.
Comment 2 Ragnar Thomsen 2016-09-27 09:45:37 UTC
Git commit 0ec7aa626901c9349f2ba8f878f35f7748b125e5 by Ragnar Thomsen.
Committed on 27/09/2016 at 09:43.
Pushed by rthomsen into branch 'Applications/16.08'.

Improve focus handling of internal previewer

This diff sets the initial focus of the internal previewer to the Part
widget and sets the autodefault property of the Close button to false.
The latter prevents the Enter key from closing the dialog which allows
the Part widget to handle the key press event instead.
Related: bug 369401
FIXED-IN: 16.08.2

M  +6    -1    part/arkviewer.cpp

http://commits.kde.org/ark/0ec7aa626901c9349f2ba8f878f35f7748b125e5