After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 563009 - path bar screws up back/forward history
path bar screws up back/forward history
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: Path Bar
3.10.x
Other All
: Normal minor
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
: 605615 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2008-12-02 18:19 UTC by Graham Cole
Modified: 2017-10-25 23:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix the interaction between back/forward history and path bar (1.70 KB, patch)
2011-01-06 11:41 UTC, Marcus Husar
none Details | Review
window: Make history-hierarchy interaction orthogonal. (2.41 KB, patch)
2017-08-18 09:07 UTC, António Fernandes
none Details | Review
window: Make history-hierarchy interaction orthogonal. (2.47 KB, patch)
2017-08-18 09:51 UTC, António Fernandes
committed Details | Review

Description Graham Cole 2008-12-02 18:19:40 UTC
Please describe the problem:
Navigating using the back/forward buttons becomes unpredictable in certain circumstances after navigating using the path bar.

Steps to reproduce:
1. run 'nautilus /usr/share/nautilus/'
2. click 'share' in the path bar
3. click 'nautilus' in the path bar
4. click the Back button


Actual results:
Back button is disabled, so nothing happens.

Expected results:
Back button is enabled and returns me to /usr/share, since that's the last place I was.

Does this happen every time?
This happens every time.

Other information:
As well as causing the back button to be disabled when I think it should work (this was the simplest demonstration I could come up with), this issue can cause the Back button to take you to an unexpected folder (i.e. not the last one you were looking at)
Comment 1 Kalin Agrawal 2009-04-20 04:05:10 UTC
https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/362112 details another aspect of this general bug.
Comment 2 Sebastien Bacher 2009-06-26 13:09:08 UTC
Thanks for the bug report. This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find.


*** This bug has been marked as a duplicate of 557462 ***
Comment 3 Graham Cole 2009-06-26 17:24:37 UTC
Sebastien, I don't think this is a duplicate of 557462...

That one appears to be purely that selections are not remembered when returning to a folder. This is about the path bar not interacting sensibly with the history of viewed folders, making the back/forward buttons do unexpected things.

I'm going to re-open this, because although that bug references this one they're very different issues.
Comment 4 Allan Day 2010-05-28 13:45:03 UTC
Confirming.
Comment 5 Allan Day 2010-06-20 20:06:54 UTC
Changing component as part of ongoing bug reorganisation work.
Comment 6 Marcus Husar 2011-01-06 11:41:53 UTC
Created attachment 177645 [details] [review]
Fix the interaction between back/forward history and path bar

Don't adjust the behavior of back/forward history if the target location
of the path bar was already visited.

After navigating using the path bar navigating using the back/forward
buttons behaves unusually if the target location of the path bar was
already visited. Therefore it becomes unpredictable for some users.
Comment 7 Cosimo Cecchi 2011-01-10 11:35:18 UTC
(In reply to comment #6)
> Created an attachment (id=177645) [details] [review]
> Fix the interaction between back/forward history and path bar
> 
> Don't adjust the behavior of back/forward history if the target location
> of the path bar was already visited.
> 
> After navigating using the path bar navigating using the back/forward
> buttons behaves unusually if the target location of the path bar was
> already visited. Therefore it becomes unpredictable for some users.

Marcus, thanks for the patch.
The code itself would look fine, but I must say that I don't like the new behavior as well.

I think ideally we should follow these principles for back/forward buttons:
- forward button should only be used in case back was explicitly used before.
- if a click on a pathbar button goes to the same directory as it would by clicking 'Back', or 'Forward', (i.e. to one of the two topmost items in history) then we should treat that as a history action.
- we should never have duplicate entries in the history list.
- back history should be cleaned only when closing a window.
- forward history should be cleaned every time we go to a directory as a result of something different from a click on a 'Back' item.

Allan, what do you think?
Comment 8 Jean-François Fortin Tam 2014-01-12 16:22:01 UTC
Hi there, is this still a problem with the latest version?
Comment 9 António Fernandes 2014-01-12 20:31:56 UTC
Yes, I can reproduce it in nautilus 3.10, as described on comment 0.
Comment 10 António Fernandes 2017-08-17 22:15:06 UTC
(In reply to Cosimo Cecchi from comment #7)
> - if a click on a pathbar button goes to the same directory as it would by
> clicking 'Back', or 'Forward', (i.e. to one of the two topmost items in
> history) then we should treat that as a history action.

This is exactly what this bug report is about. This behaviour is the "bug" being reported.

We need a decision here: if this behavior is intentional by design, please mark this a a WONTFIX and reject the patch.

(Although I personally dislike this behavior.)
Comment 11 António Fernandes 2017-08-18 09:07:08 UTC
Created attachment 357870 [details] [review]
window: Make history-hierarchy interaction orthogonal.

Forward-porting original patch.

After discussing it with Carlos on IRC, a linear history is preferred. The patch works as expected so we can fix this bug.
Comment 12 Carlos Soriano 2017-08-18 09:19:49 UTC
Review of attachment 357870 [details] [review]:

::: src/nautilus-window.c
@@ +1942,2 @@
     priv = nautilus_window_get_instance_private (window);
+    nautilus_window_open_location_full (window, location, 0, NULL, NULL);

priv is no longer used, I got a warning while compiling
Comment 13 António Fernandes 2017-08-18 09:51:33 UTC
Created attachment 357874 [details] [review]
window: Make history-hierarchy interaction orthogonal.

Sorry, forgot to look at the warnings. Fixed.
Comment 14 Carlos Soriano 2017-08-18 10:03:31 UTC
Review of attachment 357874 [details] [review]:

Looks good now, thanks!
Comment 15 Carlos Soriano 2017-08-18 12:17:36 UTC
Attachment 357874 [details] pushed as 017a90b - window: Make history-hierarchy interaction orthogonal.
Comment 16 António Fernandes 2017-10-25 23:50:20 UTC
*** Bug 605615 has been marked as a duplicate of this bug. ***