Bug 501667 - URL/Location bar truncates path when exiting edit mode with Escape key
Summary: URL/Location bar truncates path when exiting edit mode with Escape key
Status: CONFIRMED
Alias: None
Product: frameworks-kio
Classification: Frameworks and Libraries
Component: URL navigator (show other bugs)
Version: 6.11.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KIO Bugs
URL:
Keywords:
: 500254 (view as bug list)
Depends on:
Blocks:
 
Reported: 2025-03-18 01:02 UTC by Blazer Silving
Modified: 2025-03-25 21:26 UTC (History)
5 users (show)

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


Attachments
Location bar path truncation (21.30 KB, image/gif)
2025-03-21 19:31 UTC, Blazer Silving
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Blazer Silving 2025-03-18 01:02:38 UTC
SUMMARY
When editing the Location/URL Bar present in Dolphin, pressing Enter/Return or using the checkmark icon to exit the state returns the full path. 

Canceling the edit with the Escape key truncates the path to only show the current directory, until clicked into and then "Saved" with Enter.

STEPS TO REPRODUCE
1. Open Dolphin and navigate to any folder two or three levels down
2. Click into the URL/Location bar to edit, then immediately apply the change with the Enter/Return key
3. Click into edit mode again, but this time exit using Escape key

OBSERVED RESULT
The displayed path truncates to only show the current directory when exiting edit mode with Escape. Exiting with Return or mouse click displays the full path properly. 

EXPECTED RESULT
The path should fully resolve in all cases. 

SOFTWARE/OS VERSIONS
KDE Plasma Version: 6.3.3
KDE Frameworks Version: 6.12.0
Qt Version: 6.8.0

ADDITIONAL INFORMATION

Not sure precisely how old this bug is (unrelated to recent styling changes in frameworks 6.12). 

I believe this is due to Key_Escape not being defined as a mapped option in `KUrlNavigatorButton::keyPressEvent`. 
A preliminary test didn't alter the behavior though.
Comment 1 TraceyC 2025-03-19 20:26:04 UTC
Confirmed on 6.3.3 as well as git-master
Comment 2 Nate Graham 2025-03-21 18:09:27 UTC
Can confirm, and will be fixed by https://invent.kde.org/frameworks/kio/-/merge_requests/1842.
Comment 3 Blazer Silving 2025-03-21 18:25:30 UTC
MR https://invent.kde.org/frameworks/kio/-/merge_requests/1842 is actually unrelated to this one. 

The bug has been present for some time, not new to frameworks 6.12.0. I suspect it's simply because `Key_Escape` is not defined.
Comment 4 Nate Graham 2025-03-21 18:41:04 UTC
So you can still reproduce it with that merge request? I could not when I tested it.
Comment 5 postix 2025-03-21 18:41:53 UTC
*** Bug 500254 has been marked as a duplicate of this bug. ***
Comment 6 Blazer Silving 2025-03-21 19:30:40 UTC
> So you can still reproduce it with that merge request? 

Yes, this is built against latest commit in that MR and I can reproduce. Gif attached to better illustrate. 

Wasn't aware there was a bug open already btw, sorry!
Comment 7 Blazer Silving 2025-03-21 19:31:13 UTC
Created attachment 179640 [details]
Location bar path truncation
Comment 8 TraceyC 2025-03-21 20:54:58 UTC
I'm also able to reproduce this with Dolphin from git-master and kio built from
https://invent.kde.org/frameworks/kio/-/merge_requests/1842.