# Open editor at rightmost tab by default

**URL:** <https://discourse.nodered.org/t/open-editor-at-rightmost-tab-by-default/77564>\
**Category:** Feature Requests\
**Tags:** editor\
**Created:** [14 April 2023 11:27 UTC](https://discourse.nodered.org/t/open-editor-at-rightmost-tab-by-default/77564 "2023-04-14T11:27:24Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [14 April 2023 11:27 UTC](https://discourse.nodered.org/t/open-editor-at-rightmost-tab-by-default/77564/1 "2023-04-14T11:27:24Z")

</div>

There may be many tabs/flows in a Node-red setup.  
When you point a browser at the device:port, the editor opens up with the tab at the left

 ![Untitled 3](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/c/cc878d497fd6b1685060991376d73f41ed6c3956.jpeg)

This tab is probably the oldest and most stable flow[s]. If you want to work on recent flows you have to scroll, scroll, scroll to the right.

Can the editor have a setting (the default) to open at the rightmost tab?

---

<div class="post-metadata">

**Author:** ![ghayne](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ghayne/32/39_2.png) [@ghayne](https://discourse.nodered.org/u/ghayne)\
**Post date:** [14 April 2023 12:09 UTC](https://discourse.nodered.org/t/open-editor-at-rightmost-tab-by-default/77564/2 "2023-04-14T12:09:48Z")

</div>

> [@jbudd](#):
>
> Can the editor have a setting (the default) to open at the rightmost tab?

Or even the tab that was open when the editor was closed.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [14 April 2023 12:10 UTC](https://discourse.nodered.org/t/open-editor-at-rightmost-tab-by-default/77564/3 "2023-04-14T12:10:14Z")

</div>

Good observation. Though TBH, if you open on the same browser, you _should_ be presented with the same page you closed Node-RED.

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [14 April 2023 12:15 UTC](https://discourse.nodered.org/t/open-editor-at-rightmost-tab-by-default/77564/4 "2023-04-14T12:15:48Z")

</div>

My browsers delete cookies on exit.

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [14 April 2023 12:26 UTC](https://discourse.nodered.org/t/open-editor-at-rightmost-tab-by-default/77564/5 "2023-04-14T12:26:15Z")

</div>

We update the url with the id of the tab you're currently on as you navigate around.

One existing solution to this is to bookmark the editor on whatever tab you want it to open next time and it will just work.

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [14 April 2023 13:53 UTC](https://discourse.nodered.org/t/open-editor-at-rightmost-tab-by-default/77564/6 "2023-04-14T13:53:09Z")

</div>

> [@knolleary](#):
>
> bookmark the editor on whatever tab you want it to open

OK that's a good suggestion, but of course new tabs are created at the right hand end so every now and then you'd have to update the bookmark.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [14 April 2023 14:25 UTC](https://discourse.nodered.org/t/open-editor-at-rightmost-tab-by-default/77564/7 "2023-04-14T14:25:58Z")

</div>

It would be feasible for the Editor to record the current tab on change in browser storage and move to the appropriate tab on reload. If, that is, someone wanted to submit a PR containing the code changes 😁

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [14 April 2023 16:14 UTC](https://discourse.nodered.org/t/open-editor-at-rightmost-tab-by-default/77564/8 "2023-04-14T16:14:19Z")

</div>

> [@knolleary](#):
>
> We update the url with the id of the tab you're currently on

Can you point me to the bit of code on Github that does this please. Probably don't need the line number but the filename would help

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [14 April 2023 16:27 UTC](https://discourse.nodered.org/t/open-editor-at-rightmost-tab-by-default/77564/9 "2023-04-14T16:27:26Z")

</div>

> <https://github.com/node-red/node-red/blob/e5d579c1bb1e7c8fbf2d31b6a72fe7c8a54ea87f/packages/node_modules/%40node-red/editor-client/src/js/ui/workspaces.js#L139>

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [14 April 2023 19:38 UTC](https://discourse.nodered.org/t/open-editor-at-rightmost-tab-by-default/77564/10 "2023-04-14T19:38:55Z")

</div>

Not wanting to confused/complicate the situation:

I have quite a few tabs open with NR flows - at the editor level.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/8/08e010907211db505635f2122ba8f1ec6feff490.png)

They seem to _restore_ to what I was last seeing/using.

Although @jbudd said their browser deletes cookies: Would that matter?

@jbudd thoughts:  
Isn't there a way to tell the browser to NOT delete cookies from certain sites?

And to also declare things:  
I don't **QUIT** my browser. I shut down the machine with it loaded/open.

And yes, _NOW AND THEN_ the tabs (node-red side of things) _may_ not be as I remember.  
But honestly: \> 95% of the time they are as I left them.

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [14 April 2023 19:58 UTC](https://discourse.nodered.org/t/open-editor-at-rightmost-tab-by-default/77564/11 "2023-04-14T19:58:04Z")

</div>

That's a sensible comment thanks Andrew.

I had not considered that the browser would save the open tabs in a cookie, or that doing so would cause NR to open with the same current editor flow open, simply because it has never run on my machine with cookies retained.

And if you shut down your machine (as opposed to hibernating) and restart in the same place within the editor tabs then NR must be getting the info from somewhere, probably a cookie.

I'll have to experiment when I get back to the PC.

OK some observations:  
I turned off Firefox' settings to always browse in a private window and to delete cookies on shutdown, then rebooted.

Next I opened several browser tabs and pointed them to different sites. The middle tab was the Node-red editor on my Pi, pointing to a flow tab somewhere in the middle.

After restarting the computer I ran Firefox and it opened the same tabs as before, with the same tab and the same editor tab having focus.

I guess what I'm saying is Node-red behaves exactly as I think it should. How hateful is that? 🥳

Now lets see if I can tune Firefox to throw away everything but the NR cookies...

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [14 April 2023 21:00 UTC](https://discourse.nodered.org/t/open-editor-at-rightmost-tab-by-default/77564/12 "2023-04-14T21:00:12Z")

</div>

Are the Node-Red tabs on that machine or _remote_?

(Though even if remote....)

You can control which site's cookies (etc) are (and not) kept/deleted.

If you go to `about:preferences#privacy` (firefox) There is a `manage exceptions` bit that allows you to determine which site's stuff is kept/deleted.

That may be of help.

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [14 April 2023 21:04 UTC](https://discourse.nodered.org/t/open-editor-at-rightmost-tab-by-default/77564/13 "2023-04-14T21:04:22Z")

</div>

The browser is on a PC, Node-red is on a Raspberry Pi, both on the same LAN.

So far I can't get the Manage exceptions option to work. Not sure if that's because 192.168.1.25:1880 is not considered a valid URL or because I'm using private windows.

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [14 April 2023 21:07 UTC](https://discourse.nodered.org/t/open-editor-at-rightmost-tab-by-default/77564/14 "2023-04-14T21:07:13Z")

</div>

Possibly private windows.

Do you need the `:1880` at the end though?

Isn't it just the IP address?

Private windows don't store cookies (or _anything_ by default) That's why they are private.  
I suspect that is a major cause of the problem.

I just checked my settings.  
I don't have any exceptions loaded for my local sites.  
But having said that: I don't have the problem you are describing.

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [14 April 2023 21:18 UTC](https://discourse.nodered.org/t/open-editor-at-rightmost-tab-by-default/77564/15 "2023-04-14T21:18:50Z")

</div>

I do need `:1880`, that's the port that Node-red listens on.  
It is possible to change it by using a different web server and/or a proxy but I prefer to type `:1880` over learning how to do use a proxy. I've always thought I should leave jobs like that to someone else. 🤪

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [14 April 2023 21:43 UTC](https://discourse.nodered.org/t/open-editor-at-rightmost-tab-by-default/77564/16 "2023-04-14T21:43:39Z")

</div>

It wasn't I was wanting to be argumentative about the port.

I just wasn't sure you needed to qualify it in the setting to tell the browser which IP addresses to not clear the cookies (etc).

Anyway: It is strange that your browser isn't _remembering_ the pages.  
Ok, dumb question: (and to re-check what you said) If you do NOT use private browsing does it remember the page/load the previous pages?  
Given you do not QUIT the browser and rather restart the computer which the browser running.

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [14 April 2023 22:03 UTC](https://discourse.nodered.org/t/open-editor-at-rightmost-tab-by-default/77564/17 "2023-04-14T22:03:59Z")

</div>

It's very difficult to describe the precise behaviour because there are so many variables.  
However it seems that with these security and privacy settings:

- Enhanced tracking protection: Standard
- Delete cookies and site data when Firefox is closed Yes.
- Exceptions: 192.168.1.25:1880
- History: Always use private browsing: No
- Remember browsing history Yes
- Clear history when Firefox closes Yes

A restart of FIrefox will reopen the same tabs including on the NR tab, the same editor tab in focus.  
If I can't stop it reopening **all** the tabs I will go back to the previous settings.

Thanks for your help. I think the topic has probably been exhausted as far as the forum goes.

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [14 April 2023 22:17 UTC](https://discourse.nodered.org/t/open-editor-at-rightmost-tab-by-default/77564/18 "2023-04-14T22:17:27Z")

</div>

No problems.

I don't mind helping. (Though I do not want to boast that I am smart)  
I know it is annoying being _stuck_ with a problem and not knowing what to do.  
Status quo for me most of the time.

My `Enhanced Tracking Protection` is `custom`.  
But I am not going to say that really helps me (or you) with this specific problem.

The bigger idea is to share knowledge and help as much as possible.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [13 June 2023 22:17 UTC](https://discourse.nodered.org/t/open-editor-at-rightmost-tab-by-default/77564/19 "2023-06-13T22:17:56Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
