Bug 510757

Summary: Creating new folders with keyboard shortcut is buggy
Product: [Applications] dolphin Reporter: gggeri91 <geloczigeri>
Component: generalAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: daninshed, dolphin-bugs-null
Priority: NOR Keywords: regression
Version First Reported In: 25.08.1   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description gggeri91 2025-10-18 17:15:00 UTC
SUMMARY
Creating a new folder with the keyboard shortcut (default: Ctrl+Shift+N) creates the folder at unexpected path.

STEPS TO REPRODUCE
1. Navigate to an empty test folder
2. Press Ctrl+Shift+N
3. Enter a folder name, then press ENTER. The first new folder is created.
4. Press Ctrl+Shift+N to create a second folder
5. Enter a second folder name, then press ENTER
6. The second folder is created under the first folder incorrectly.

This is a significant regression, as it is no longer possible to quickly create new folders with the keyboard shortcut. As a work-around, I have to press the ESC key after a new folder is created to loose the focus. 

OBSERVED RESULT
Creating a new folder with the keyboard shortcut incorrectly creates the new folder at an unexpected location. The second folder is actually visible after creation! This really disrupts the workflow with folders.

EXPECTED RESULT
The new folders should be always created in the current directory (it was like this in previous versions).

SOFTWARE/OS VERSIONS
Operating System: Fedora Linux 42
KDE Plasma Version: 6.4.5
KDE Frameworks Version: 6.19.0
Qt Version: 6.9.2
Kernel Version: 6.16.12-200.fc42.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 32 × AMD Ryzen 9 5950X 16-Core Processor
Memory: 64 GiB of RAM (62.7 GiB usable)
Graphics Processor: AMD Radeon RX 6700 XT
Manufacturer: Micro-Star International Co., Ltd.
Product Name: MS-7D52
System Version: 1.0

ADDITIONAL INFORMATION
Comment 1 gggeri91 2025-10-18 17:24:37 UTC
Correction.

SUMMARY
Creating a new folder with the keyboard shortcut (default: Ctrl+Shift+N) creates the folder at unexpected path.

STEPS TO REPRODUCE
1. Navigate to an empty test folder
2. Press Ctrl+Shift+N
3. Enter a folder name, then press ENTER. The first new folder is created.
4. Press Ctrl+Shift+N to create a second folder
5. Enter a second folder name, then press ENTER
6. The second folder is created under the first folder incorrectly.

This is a significant regression, as it is no longer possible to quickly create new folders with the keyboard shortcut one after the other. 
As a work-around, I found that pressing the ESC key after a new folder is created to loose the focus restores the correct behavior.

OBSERVED RESULT
Creating a new folder with the keyboard shortcut incorrectly creates the new folder at an unexpected location when more than one folders are created one after the other. The even numbered folders are always created under the previously created folder. Weird. Just try to create 6 folders one after the other, you will be surprised. This really disrupts the workflow with folders.

EXPECTED RESULT
The new folders should be always created in the current directory (it was like this in previous versions).

SOFTWARE/OS VERSIONS
Operating System: Fedora Linux 42
KDE Plasma Version: 6.4.5
KDE Frameworks Version: 6.19.0
Qt Version: 6.9.2
Kernel Version: 6.16.12-200.fc42.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 32 × AMD Ryzen 9 5950X 16-Core Processor
Memory: 64 GiB of RAM (62.7 GiB usable)
Graphics Processor: AMD Radeon RX 6700 XT
Manufacturer: Micro-Star International Co., Ltd.
Product Name: MS-7D52
System Version: 1.0

ADDITIONAL INFORMATION
Comment 2 gggeri91 2025-10-18 17:34:01 UTC
Here is a great example. 

1. Create a new folder named "test"
2. Navigate into "test"
3. Press Ctrl+Shift+N, enter "1" as folder name, press ENTER
4. Press Ctrl+Shift+N, enter "2" as folder name, press ENTER
5. Press Ctrl+Shift+N, enter "3" as folder name, press ENTER
6. Press Ctrl+Shift+N, enter "4" as folder name, press ENTER
7. Press Ctrl+Shift+N, enter "5" as folder name, press ENTER
8. Press Ctrl+Shift+N, enter "6" as folder name, press ENTER
9. At this point, the "test" folder will contain "1", "3", "6" folders. I am not joking.

Actual:
```$ tree test
test
├── 1
│   └── 2
├── 3
│   └── 4
└── 5
    └── 6


Expected:
$ tree test
test
├── 1
├── 2
├── 3
├── 4
├── 5
└── 6
Comment 3 gggeri91 2025-10-18 18:38:08 UTC
I think this has to do something with the recent "Selection mode" changes. Dolphin v24.12.3 works just fine.
Comment 4 gggeri91 2025-10-26 14:54:18 UTC
The bug appeared in Dolphin v25.08.1. 
25.08.0 works fine.
Comment 6 gggeri91 2025-10-26 15:11:45 UTC
Relates to https://bugs.kde.org/show_bug.cgi?id=508196
Comment 7 Bug Janitor Service 2025-10-30 11:45:22 UTC
A possibly relevant merge request was started @ https://invent.kde.org/system/dolphin/-/merge_requests/1083
Comment 8 Méven 2025-11-02 13:13:55 UTC
Git commit a9cbac74aafe1ce3c5ec37010b84ea8a40035941 by Méven Car.
Committed on 02/11/2025 at 13:13.
Pushed by meven into branch 'master'.

Revert "Make create folder use selected directory !1026"

This reverts merge request !1035 65bb95f5

This simply made an unexpected behavior change, opposite to most users expectations.
https://discuss.kde.org/t/slightly-strange-behaviour-in-dolphin/40209/33

Disregarding https://en.wikipedia.org/wiki/Principle_of_least_astonishment (Occam's razor)

Having different behavior when there a folder selected + shortcut, and a folder selected + context menu should be considered different use case.
One has a strong context established, the other has no context from the user perspective.
Related: bug 508196

It re-introduces 508196

M  +2    -20   src/dolphinmainwindow.cpp

https://invent.kde.org/system/dolphin/-/commit/a9cbac74aafe1ce3c5ec37010b84ea8a40035941
Comment 9 Méven 2025-11-02 13:34:28 UTC
Git commit 8d4a3802b690a8e3b43d4390652674579a78f4eb by Méven Car.
Committed on 02/11/2025 at 13:15.
Pushed by meven into branch 'release/25.08'.

Revert "Make create folder use selected directory !1026"

This reverts merge request !1035 65bb95f5

This simply made an unexpected behavior change, opposite to most users expectations.
https://discuss.kde.org/t/slightly-strange-behaviour-in-dolphin/40209/33

Disregarding https://en.wikipedia.org/wiki/Principle_of_least_astonishment (Occam's razor)

Having different behavior when there a folder selected + shortcut, and a folder selected + context menu should be considered different use case.
One has a strong context established, the other has no context from the user perspective.
Related: bug 508196

It re-introduces 508196


(cherry picked from commit a9cbac74aafe1ce3c5ec37010b84ea8a40035941)

62ad5575 Revert "Make create folder use selected directory !1026"

Co-authored-by: Méven Car <meven@kde.org>

M  +2    -20   src/dolphinmainwindow.cpp

https://invent.kde.org/system/dolphin/-/commit/8d4a3802b690a8e3b43d4390652674579a78f4eb