Bug 503576

Summary: Focus is split between split view panes when starting with split view and remembering of last used folders & tabs is disabled
Product: [Applications] dolphin Reporter: Jan Rathmann <jan.rathmann>
Component: split viewAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: CONFIRMED ---    
Severity: normal CC: akselmo, arddix, aristsakas, burnyourfire, colibri, dolphin-bugs-null, mpy, paulhollensen, rarp, regionstellarship_fouroner
Priority: NOR Keywords: regression
Version First Reported In: git-master   
Target Milestone: ---   
Platform: Other   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=508554
https://bugs.kde.org/show_bug.cgi?id=513903
https://bugs.kde.org/show_bug.cgi?id=512011
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Screenshot of the weird focus limbo state
Screencast showing Dolphin's weird behaviour
Dolphin deletes random files

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. ***
Comment 14 roman 2025-12-19 06:32:07 UTC
I got Dolphin Version 25.12.0 yesterday and if understand it this fix should be included? 

Unfortunately I don't see any improvement. The behavior is still broken for me (openSuse  Tumbleweed).

Possible duplicates: 
https://bugs.kde.org/show_bug.cgi?id=512011
https://bugs.kde.org/show_bug.cgi?id=509525
Comment 15 R. Arp 2025-12-28 20:13:57 UTC
(In reply to roman from comment #14)
> I got Dolphin Version 25.12.0 yesterday and if understand it this fix should
> be included? 
> Unfortunately I don't see any improvement. The behavior is still broken for
> me (openSuse  Tumbleweed).
Same here, also using 25.12.0 on Tumbleweed.

Thanks for putting so much work into it but this bug is not fixed yet. I am going to upload a short screencast showing how to trigger it.

Notes:
- In dual-pane view, Dolphin always starts up as expected. I can click any file in either pane, the corresponding location bar will always be shown as active.
- When opening a second tab, all is still well (within that tab).
- Highlighted, yet inactive, window panes can reliably be activated by pressing the Tab key.
- Trouble starts as soon as I leave the second tab to return to the first tab.

From here on, clicking on any file/folder does not activate the corresponding tab anymore. I can still highlight files but shortcuts such as CTRL+C will not be applied to the selected files, but to files/folders in the opposite pane. This is were this bug is shifting from 'very annoying' to 'potentially disastrous':
As shown in the screencast, if I click on a file in either of the inactive panes and then press the DEL key, another file (previously marked) in the opposite pane is being deleted. Pressing CTRL+Z restores the deleted file, pressing the DEL key again activates the 'Selection Mode' in the opposite pane.

It is confusing. The more I deal with it, the more confused I am getting myself.
Comment 16 R. Arp 2025-12-28 20:18:00 UTC
Created attachment 188049 [details]
Screencast showing Dolphin's weird behaviour
Comment 17 roman 2026-01-17 07:22:12 UTC
Created attachment 188610 [details]
Dolphin deletes random files

Another screencast showing this bug. I had to record it in a X11 session since no keyrecorder seems to work with wayland.

The weird behavior starts when I switch/open another tab and return to the tab with the split view.

- Right clicking on files does not show the mouse menu.
- I can navigate in the right view with the keyboard but performing actions like "F2" for renaming or "del" for deleting files performs them in the left view which leads to random deleted files.
- opening a file in either splitview side unblocks this behavior until I switch to another tab again.
Comment 18 roman 2026-01-17 08:48:55 UTC
Just discovered that closing any open tab untriggers this state also (even it there are multiple tabs open).
Comment 19 roman 2026-02-08 06:21:15 UTC
I got Dolphin 25.12.1 and the bug is still present :(
Comment 20 R. Arp 2026-02-08 15:16:52 UTC
(In reply to roman from comment #19)
> I got Dolphin 25.12.1 and the bug is still present :(

As it is in 25.12.2.

I recently found one of my punk rock albums in a project folder that I had uploaded to the client's site. I can only surmise that it got there due to this bug, see #2.
Comment 21 Akseli Lahtinen 2026-02-11 12:24:24 UTC
I am unable to repro this on dolphin 26.03.70

What I did was:

1. Split views, both in different folders, details view
2. Click on split 1 to select a file
3. Click on split 2 to select another file
4. Open new tab
5. Go back to the split view tab
6. Press delete

The last active item, file in split 2, gets deleted.

If I do steps 2 and 3 in reverse order, the selected file in split 1 gets deleted as expected.

Operating System: KDE Linux 2026-02-11
KDE Plasma Version: 6.6.80
KDE Frameworks Version: 6.24.0
Qt Version: 6.10.2
Kernel Version: 6.18.7-zen1-1-zen (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 3600 6-Core Processor
Memory: 16 GiB of RAM (15.5 GiB usable)
Graphics Processor: AMD Radeon RX 6600
Comment 22 tony 2026-02-11 13:10:48 UTC
  dolphin 26.03.70 is not available to normal users, when will it be released


On 11/02/2026 13:24, Akseli Lahtinen wrote:
> https://bugs.kde.org/show_bug.cgi?id=503576
>
> Akseli Lahtinen <akselmo@akselmo.dev> changed:
>
>             What    |Removed                     |Added
> ----------------------------------------------------------------------------
>                   CC|                            |akselmo@akselmo.dev
>
> --- Comment #21 from Akseli Lahtinen <akselmo@akselmo.dev> ---
> I am unable to repro this on dolphin 26.03.70
>
> What I did was:
>
> 1. Split views, both in different folders, details view
> 2. Click on split 1 to select a file
> 3. Click on split 2 to select another file
> 4. Open new tab
> 5. Go back to the split view tab
> 6. Press delete
>
> The last active item, file in split 2, gets deleted.
>
> If I do steps 2 and 3 in reverse order, the selected file in split 1 gets
> deleted as expected.
>
> Operating System: KDE Linux 2026-02-11
> KDE Plasma Version: 6.6.80
> KDE Frameworks Version: 6.24.0
> Qt Version: 6.10.2
> Kernel Version: 6.18.7-zen1-1-zen (64-bit)
> Graphics Platform: Wayland
> Processors: 12 × AMD Ryzen 5 3600 6-Core Processor
> Memory: 16 GiB of RAM (15.5 GiB usable)
> Graphics Processor: AMD Radeon RX 6600
>
Comment 23 R. Arp 2026-02-11 16:15:08 UTC
(In reply to Akseli Lahtinen from comment #21)
> I am unable to repro this on dolphin 26.03.70
> What I did was:
Thanks for testing and posting.

Just to make sure I can reproduce the bug once again, I created a 3rd user and tested Dolphin's behaviour:
No bug triggered. 
Dolphin 25.12.2 works as expected with multiple dual-pane tabs. It still works correctly after logging out and back in again.

I have no idea as to why the 2nd user exhibited the same bug that my main user experiences. I use it solely for experimenting with alternative GUIs such as labwc/DMS.
Comment 24 roman 2026-02-11 20:29:07 UTC
So I did some more testing and it is related to the filter bar being activated. 

Could you please either turn it on by default for all windows ( settings -> interface -> show filter bar) or press strg+i inside the split view so it is activated and then switch the tab + get back to the split view with the filter bar activated and try again deleting/renaming files.

This triggers the behavior for me.
Comment 25 R. Arp 2026-02-11 21:06:33 UTC
(In reply to roman from comment #24)
> So I did some more testing and it is related to the filter bar being
> activated. 
Good catch!
I always have filter bars activated and have just disabled them in the settings. It does indeed work now as expected.
It also explains why Dolphin worked properly under my newly created 3rd user, I hadn't yet activated filter bars.
Comment 26 Akseli Lahtinen 2026-02-12 08:45:59 UTC
Ah, can confirm when filter bars are enabled! Good catch indeed.

Operating System: KDE Linux 2026-02-11
KDE Plasma Version: 6.6.80
KDE Frameworks Version: 6.24.0
Qt Version: 6.10.2
Kernel Version: 6.18.7-zen1-1-zen (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 3600 6-Core Processor
Memory: 16 GiB of RAM (15.5 GiB usable)
Graphics Processor: AMD Radeon RX 6600