Pre-select navigation bar URL when clicking on it to enter edit mode
AbandonedPublic

Authored by ngraham on Sep 22 2017, 9:21 PM.

Details

Reviewers
broulik
dfaure
Group Reviewers
KDE Applications
Frameworks
Summary

BUG: 164318

When the user clicks on a non-editable navigation bar to enter edit mode, always pre-select the URL.

We mimic the behavior of web browsers here, since this is the same UI element.

Test Plan

Tested in KDE Neon. Clicking on the URL bar in Dolphin and file picker dialogs pre-selects the text.

Diff Detail

Repository
R241 KIO
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
ngraham created this revision.Sep 22 2017, 9:21 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptSep 22 2017, 9:21 PM
Restricted Application added a subscriber: Frameworks. · View Herald Transcript

The linked bug looks wrong.

I'm not sure I agree with this change. We save a click if we want to go from /home/foo to e.g. /usr, but we add an additional click if we just want to append something to /home/foo. I do this all the time (to go in the hidden folders in my home).

Also, only chrome selects the whole URL when clicking the urlbar. Firefox doesn't.

ngraham edited the summary of this revision. (Show Details)Sep 23 2017, 12:49 AM

Opps, I've corrected the bug number.

You're right that this improves one workflow and impairs another, but the way I see it, the patch simply brings consistency with the behavior you get if you hit ctrl-L/Replace Location.

Though you're right that it also takes us out of sync with Firefox, in which ctrl-L selects the whole path, but clicking on the URL bar doesn't.

Hmm.

You're right that this improves one workflow and impairs another, but the way I see it, the patch simply brings consistency with the behavior you get if you hit ctrl-L/Replace Location.

I don't know, it looks already consistent to me:

  • CTRL+L is the shortcut for the "Replace Location" action, so it makes sense to pre-select the URL in this case.
  • The tooltip of KUrlNavigator says: "Click to Edit Location", and "Edit" does not necessarily imply "Replace"
ngraham abandoned this revision.Sep 23 2017, 1:51 PM

Fair enough. Your points are stronger than mine, now that I think about it.