Bug 503576 - Focus is split between split view panes when starting with split view and remembering of last used folders & tabs is disabled
Summary: Focus is split between split view panes when starting with split view and rem...
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: split view (other bugs)
Version First Reported In: git-master
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords: regression
: 508670 512162 (view as bug list)
Depends on:
Blocks:
 
Reported: 2025-04-30 12:45 UTC by Jan Rathmann
Modified: 2025-11-24 08:02 UTC (History)
8 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
Screenshot of the weird focus limbo state (72.23 KB, image/png)
2025-04-30 12:46 UTC, Jan Rathmann
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Rathmann 2025-04-30 12:45:17 UTC
SUMMARY
When starting Dolphin with Split view enabled and without remembering the last used folders and tabs, the two split view panes end up in a weird limbo state of splitting the keyboard and mouse focus between them, while both are looking as if they were "sort of focused" (see screenshot).

STEPS TO REPRODUCE
1. Start Dolphin, go to Settings -> Interface -> Folders & Tabs
2. Select "Show on startup: /home/yourusername (or any other folder)"
3. Enable "New windows: Begin in split view mode"
4. Close Dolphin, start Dolphin again.

OBSERVED RESULT
* Both split view panes have the same background color, and the location bar is grayed out on both panes.
* The left pane has keyboard focus (to test, press arrow down on keyboard), but the right pane has focus for opening folders via mouse click on the places panel, and also for the toolbar button that closes the active split view pane!
* This weird state is ended by either opening a directory via double-click in one of the split views, or by opening one of Dolphin's modal dialog windows (like Settings, Keyboard Shortcut configuration etc.).

EXPECTED RESULT
Visual distinction which of the two panes has focus, with both keyboard and mouse focus applying to the same pane.

SOFTWARE/OS VERSIONS
KDE Plasma Version: 6.3.80
KDE Frameworks Version: 6.14.0
Qt Version: 6.8.3

ADDITIONAL INFORMATION
Reproduced with
* Dolphin + Plasma build from master on Kubuntu 25.04
* Neon Unstable live image in a VM

On Dolphin 25.04 (Neon User live image) the bug is absent, so it seems to be a recent regression on master.
Comment 1 Jan Rathmann 2025-04-30 12:46:18 UTC
Created attachment 180811 [details]
Screenshot of the weird focus limbo state
Comment 2 R. Arp 2025-10-12 13:33:09 UTC
I have a very similar experience, though I did set up Dolphin to remember the last session.

I believe the bug's Importance ought to be escalated since its repercussions might be much more grave:
In this "focus-less" state, when
- highlighting a file and pressing the DEL key, another file/folder in the opposite window pane will be deleted instead.
- copying a file with Ctrl+C, switching to another tab and trying to paste it with Ctrl+V, Dolphin pastes a different file that was copied earlier. The highlighted file I thought I just copied wasn't copied after all.

This state can reliably be ended by pressing the Tab key once. Following that, each pane gets focused properly upon left-click.

I also created a new user account to test a virgin Dolphin setup, same behavior there.

System info:
Operating System: openSUSE Tumbleweed 20251006
KDE Plasma Version: 6.4.5
KDE Frameworks Version: 6.18.0
Qt Version: 6.9.2
Kernel Version: 6.17.0-2-default (64-bit)
Graphics Platform: Wayland
Comment 3 SkyWalteron 2025-10-17 02:29:24 UTC
Hi, This issue is similar this?
https://bugs.kde.org/show_bug.cgi?id=508554
Comment 4 Jan Rathmann 2025-10-17 07:38:16 UTC
*** Bug 508554 has been marked as a duplicate of this bug. ***
Comment 5 Paul 2025-10-18 17:06:43 UTC
Also affected, regardless of whether dolphin is set to restore session.
New tabs always have split view panes in limbo.
Given that Jan saw this already on April 30, the only commit that stands out to me is https://invent.kde.org/system/dolphin/-/commit/9d60570ca784000cb5ef78b13861eee58117595d, since it is not in 25.04, was committed in April and contains
`    primaryUrlNavigator()->setBackgroundEnabled(enabled);`

frameworks 6.19.0
dolphin 25.08.2
Qt 6.10.0
Arch
Comment 6 Paul 2025-10-18 17:41:49 UTC
(In reply to Paul from comment #5)
> Also affected, regardless of whether dolphin is set to restore session.
> New tabs always have split view panes in limbo.
> Given that Jan saw this already on April 30, the only commit that stands out
> to me is
> https://invent.kde.org/system/dolphin/-/commit/
> 9d60570ca784000cb5ef78b13861eee58117595d, since it is not in 25.04, was
> committed in April and contains
> `    primaryUrlNavigator()->setBackgroundEnabled(enabled);`
> 
> frameworks 6.19.0
> dolphin 25.08.2
> Qt 6.10.0
> Arch

nm, reverting that commit had no effect on this.
Comment 7 Paul 2025-10-18 19:04:48 UTC
I've determined this bug was introduced in https://invent.kde.org/system/dolphin/-/commit/4102ccb80457eea44ea280f0ace2a419602bc34b which is, unfortunately, quite large.
Comment 8 paul 2025-10-26 06:01:38 UTC
*** Bug 508670 has been marked as a duplicate of this bug. ***
Comment 9 roman 2025-11-04 16:29:17 UTC
Wouldn't it be reasonable to raise the importance since this issue can lead to randomly deleted files?

Is it possible to make the author of this commit aware of this bug?
Comment 10 Bug Janitor Service 2025-11-16 11:26:47 UTC
A possibly relevant merge request was started @ https://invent.kde.org/system/dolphin/-/merge_requests/1101
Comment 11 Rafał Lichwała 2025-11-16 18:11:53 UTC
Git commit 4916403d46216237205394dc86a86b8ea5a4cedc by Rafał Lichwała.
Committed on 16/11/2025 at 14:10.
Pushed by meven into branch 'master'.

main: set active view in split mode when not restoring session

When Dolphin config was set to start in split mode by default
AND simply open the given folder in both panels
(Settings -> Folders&Tabs -> Show on startup -> selected folder [NOT "...state from last time"])
no view was initially active making weird side-effects described in both bugs.

This commit solves that by calling mainWindow->openDirectories
on start when both of the above conditions are met.
Related: bug 508554

M  +4    -0    src/main.cpp

https://invent.kde.org/system/dolphin/-/commit/4916403d46216237205394dc86a86b8ea5a4cedc
Comment 12 Méven 2025-11-22 21:34:52 UTC
Git commit 3f5bf2dfb18feffc84770cc19c6e2786ff8de8f8 by Méven Car, on behalf of Rafał Lichwała.
Committed on 22/11/2025 at 21:34.
Pushed by meven into branch 'release/25.12'.

main: set active view in split mode when not restoring session

When Dolphin config was set to start in split mode by default
AND simply open the given folder in both panels
(Settings -> Folders&Tabs -> Show on startup -> selected folder [NOT "...state from last time"])
no view was initially active making weird side-effects described in both bugs.

This commit solves that by calling mainWindow->openDirectories
on start when both of the above conditions are met.
Related: bug 508554


(cherry picked from commit 4916403d46216237205394dc86a86b8ea5a4cedc)

Co-authored-by: Rafał Lichwała <rafal@siliconet.pl>

M  +4    -0    src/main.cpp

https://invent.kde.org/system/dolphin/-/commit/3f5bf2dfb18feffc84770cc19c6e2786ff8de8f8
Comment 13 burnyourfire 2025-11-24 08:02:18 UTC
*** Bug 512162 has been marked as a duplicate of this bug. ***