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 764035 - "Open in new tab" switches focus to the new tab
"Open in new tab" switches focus to the new tab
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: Tabs
3.19.x
Other Linux
: Normal normal
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-03-22 17:22 UTC by Bastian Ilsø
Modified: 2017-03-09 21:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
do not switch focus to new tabs (4.00 KB, patch)
2016-03-24 21:43 UTC, Razvan Chitu
committed Details | Review

Description Bastian Ilsø 2016-03-22 17:22:20 UTC
If I right-click a folder and choose "Open in new tab", the focus is switched away from the current tab. The same happens when I middle-click a folder (which, btw has to be middle-clicked twice to work, not sure if that's also a bug, it used to be that once was enough).

It feels inconsistent to me because this does not happen with other tab-based applications such as firefox, chromium or epiphany. In these applications, the focus is not switched away from the current tab.
Comment 1 Carlos Soriano 2016-03-23 12:50:21 UTC
That is probably a design decision in nautilus long time ago.
If it doesn't bring a big benefit on changing a workflow we prefer to not change it because that means changing how the users used to work.

In this case I cannot see a big benefit, and I didn't see any bug report asking for this in the past, so I will close it as a not a bug.

The requiring double click is a bug indeed, open a new one please.
Comment 2 Carlos Soriano 2016-03-23 13:13:03 UTC
This is a regression, in 3.14 this was not like that.
Comment 3 Razvan Chitu 2016-03-24 21:43:33 UTC
Created attachment 324729 [details] [review]
do not switch focus to new tabs

In Nautilus, when a location is opened in a new tab, the new tab gets
automatically focused. This behavior is not consistent with other tab-based
applications, such as browsers - Epiphany, Firefox, Chromium to name a few. It
is also a regression, since this behavior was not present in 3.14. In order to
fix this, set a flag so the new tab is not made active.
Comment 4 Carlos Soriano 2016-03-29 07:34:54 UTC
Review of attachment 324729 [details] [review]:

LGTM thanks!
can you commit to master and gnome-3-20 please
Comment 5 Razvan Chitu 2016-03-29 09:54:16 UTC
Attachment 324729 [details] pushed as 9028e33 - do not switch focus to new tabs
Comment 6 Razvan Chitu 2016-03-29 09:55:52 UTC
Comment on attachment 324729 [details] [review]
do not switch focus to new tabs

Attachment 324729 [details] pushed as 817d964 - do not switch focus to new tabs
Comment 7 alex diavatis 2016-03-29 13:36:47 UTC
(In reply to Razvan Chitu from comment #3)
> Created attachment 324729 [details] [review] [review]
> do not switch focus to new tabs
> 
> In Nautilus, when a location is opened in a new tab, the new tab gets
> automatically focused. This behavior is not consistent with other tab-based
> applications, such as browsers - Epiphany, Firefox, Chromium to name a few.

Not really. In Chrome for example, when you open a new Tab or duplicate a Tab from Tab Store, it gives you focus. Maybe an association in nautilus would be:

- No focus when open a Tab from main view
- Focus when open a Tab from sidebar

After that patch, it feels awkward when opening a new tab from sidebar and it doesn't give focus. You obviously open it to use it immediately, not for later use.  

Please consider to at least provide an option, in Nautilus preferences.
Comment 8 Neil Herald 2016-05-02 18:39:34 UTC
Was just about to raise a bug about this, as master doesn't behave how I'd expect... Pretty much all tab based apps I've used switch to the new tab (Firefox, gedit, etc), so I thought the fact it wasn't switching now was a bug. 

Also we're being inconsistent at the moment: 
- Open in a New Tab - doesn't switch automatically
- Ctrl+T/New Tab - switches to new tab
Comment 9 Bastian Ilsø 2017-03-09 21:30:24 UTC
(In reply to Neil Herald from comment #8)
> Was just about to raise a bug about this, as master doesn't behave how I'd
> expect... Pretty much all tab based apps I've used switch to the new tab
> (Firefox, gedit, etc), so I thought the fact it wasn't switching now was a
> bug. 
> 
> Also we're being inconsistent at the moment: 
> - Open in a New Tab - doesn't switch automatically
> - Ctrl+T/New Tab - switches to new tab

I disagree. I am using Nautilus 3.22.2 and it has consistent behavior with firefox, chromium and epiphany:


- In the browsers, right-clicking a link and selecting "Open link in new tab" it does not switch to the tab. Nautilus behaves the same. If you right-click a folder and select "Open in new tab", it does not switch to the tab.

- In the browsers, pressing Ctrl+T or using the "New Tab" button does change switch to the new tab. Nautilus behaves the same.

- In the browsers, middle clicking a link opens a new tab, but does not switch to the tab. In nautilus middle-clicking does nothing at all which is inconsistent. However, if you middle-click twice (double middle-click), it behaves the same.


I would not treat the sidebar any different from the content. I think the action "right-click -> open in new tab" should behave consistently wherever it is exposed in the interface. I am also strongly in favor of keeping consistency with browsers as I would argue this is where most people get acquainted with tab-based workflows (and create expectations thereof).