Bug 440888 - Search+Replace tab key jumps to editor window so you never reach "replace"
Summary: Search+Replace tab key jumps to editor window so you never reach "replace"
Status: RESOLVED FIXED
Alias: None
Product: frameworks-ktexteditor
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.78.0
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-08-12 08:08 UTC by Michael Ziegler
Modified: 2022-10-03 08:55 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.99
Sentry Crash Report:


Attachments
KTexteditor Search and Replace Tab Navigation (71.44 KB, video/webm)
2021-08-27 13:34 UTC, Jan Paul Batrina
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Ziegler 2021-08-12 08:08:39 UTC
When you try to search&replace something using the keyboard, after typing the replacement, when you hit tab to go to the actual "Replace" buttons, the focus jumps first to the Mode field (which is totally ok) and then into the editor, where you end up editing the document rather than performing the actual search&replace you were after.


STEPS TO REPRODUCE
1. Hit CTRL+r to open the search/replace panel.
2. Type some search keyword, hit tab. Type the replacement.
3. Now hit tab until the "Replace" or "Replace all" buttons become highlighted so that you can perform the search&replace.

OBSERVED RESULT

After the second time you press tab, you've ended up in the editor where you now deleted your selection and you're happily inserting tabs or spaces.

EXPECTED RESULT

* After a few times, the "Replace" or "Replace All" buttons should be focused so that I can actually perform the purpose of this panel.

* Under no circumstances should tab bring me back to the editor (that's what ESC is for), because once focus ends up there, pressing tab is actually descructive to the document.

SOFTWARE/OS VERSIONS

Operating System: Debian GNU/Linux 11
KDE Plasma Version: 5.20.5
KDE Frameworks Version: 5.78.0
Qt Version: 5.15.2
Kernel Version: 5.10.0-8-amd64
OS Type: 64-bit
Processors: 8 × Intel® Core™ i5-10210U CPU @ 1.60GHz
Memory: 15.3 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics
ADDITIONAL INFORMATION
Comment 1 Kåre Särs 2021-08-15 05:56:42 UTC
Thanks for the report!

I cannot reproduce with the latest version... Can you test with a newer version? You should be able to install and test with either the Snap package or one of the Appimages you can find at https://kate-editor.org/get-it/


Regards,
 Kåre
Comment 2 Jan Paul Batrina 2021-08-27 13:34:22 UTC
Created attachment 141088 [details]
KTexteditor Search and Replace Tab Navigation

I can confirm the bug with kate/ktexteditor built from master. To clarify, the bug is with the builtin ktexteditor search and replace, not the S&R plugin of kate (see attached video).

The Replace/Find buttons can be accessed by using Shift+Tab instead. In fact, the navigation is more "normal" or "complete" when using Shift+Tab since it visits all widgets in contrast with using only Tab which skips the Replace/Find buttons as reported here.
Comment 3 Jan Paul Batrina 2021-08-27 13:43:19 UTC
*Correction, navigating with Tab navigates only until the "Mode" combobox before going to the main text area. The rest of the widgets are only navigatable by going back with Shift+Tab, but then it skips the widgets that were navigatable with Tab
Comment 4 Waqar Ahmed 2022-10-03 08:55:20 UTC
Git commit f406a880dbaa2a72e4e807ae9cae2435ca479fda by Waqar Ahmed.
Committed on 03/10/2022 at 08:55.
Pushed by waqar into branch 'master'.

Fix tab order in search
FIXED-IN: 5.99

M  +11   -1    src/search/searchbarpower.ui

https://invent.kde.org/frameworks/ktexteditor/commit/f406a880dbaa2a72e4e807ae9cae2435ca479fda