# Feature Request: Function Node - Option to save without closing

**URL:** <https://discourse.nodered.org/t/feature-request-function-node-option-to-save-without-closing/58176>\
**Category:** Feature Requests\
**Created:** [11 February 2022 20:50 UTC](https://discourse.nodered.org/t/feature-request-function-node-option-to-save-without-closing/58176 "2022-02-11T20:50:32Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![harmonic7](https://avatars.discourse-cdn.com/v4/letter/h/b5a626/32.png) [@harmonic7](https://discourse.nodered.org/u/harmonic7)\
**Post date:** [11 February 2022 20:50 UTC](https://discourse.nodered.org/t/feature-request-function-node-option-to-save-without-closing/58176/1 "2022-02-11T20:50:33Z")

</div>

It would be useful if we could save a function node without having to close the function editor. Currently we must press **Done** which closes the function editor.

- We might have a function node sandwiched between an inject node and a debug node
- We wish to check the output to ensure our function correct.
- Currently we are slowed down by repeatedly closing and opening the function editor to check the debug output.

Perhaps this would be smoother if they worked as follows:

- When the function node editor was visible, this wouldn't disable the flow editor (showing the other nodes)
- If a change was made in the function editor, then the flow editor could be disabled.
- When the function in the function editor was saved (via a button or some other means), the flow editor would be re-enabled.

---

<div class="post-metadata">

**Author:** ![harmonic7](https://avatars.discourse-cdn.com/v4/letter/h/b5a626/32.png) [@harmonic7](https://discourse.nodered.org/u/harmonic7)\
**Post date:** [11 February 2022 21:04 UTC](https://discourse.nodered.org/t/feature-request-function-node-option-to-save-without-closing/58176/2 "2022-02-11T21:04:33Z")

</div>

Thinking further, perhaps this could be achieved by allowing the main deploy button to be enabled while the function node editor is open?

---

<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:** [12 February 2022 18:48 UTC](https://discourse.nodered.org/t/feature-request-function-node-option-to-save-without-closing/58176/3 "2022-02-12T18:48:24Z")

</div>

Hi @harmonic7

this topic has been covered many times in the forum - most recently here:

> [@Save and deploy](https://discourse.nodered.org/t/save-and-deploy/57339/2):
>
> The question of keeping the edit dialog open when you click deploy has been asked and answered lots of times. The way the edit dialogs work requires them to be closed to get the changes applied - they cannot be left open. To change that would require changing the whole lifecycle of how nodes are edited - which we cannot do in the core - all 3500+ nodes in the community would have to be updated, otherwise you end up with a very inconsistent experience of some nodes letting you do that, and some …

---

<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:** [12 February 2022 23:33 UTC](https://discourse.nodered.org/t/feature-request-function-node-option-to-save-without-closing/58176/4 "2022-02-12T23:33:23Z")

</div>

As much as I can understand what you are saying (@harmonic7) what you are saying is a bit "splitting hairs".

It is annoying but the mechanics are as they are.

You are editing the node. Fair enough.

But if you want to see what changes the editing does, you have to accept that you have to _close_ the edit window and deploy it.

Otherwise NR can't (as is now) do it.

And as Nic (@knolleary) has said allowing that to happen would mean a whole rewrite of how things work.

It can't be that much effort to `close`, `deploy` and `inject` to see what has happened.

---

<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:** [13 February 2022 00:04 UTC](https://discourse.nodered.org/t/feature-request-function-node-option-to-save-without-closing/58176/5 "2022-02-13T00:04:19Z")

</div>

Three or four clicks isn't so onerous but finding where you last edited a long template or function can be a pain.

Is it possible for the editor to save the line you last edited and take you there when you open it?

---

<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:** [13 February 2022 01:11 UTC](https://discourse.nodered.org/t/feature-request-function-node-option-to-save-without-closing/58176/6 "2022-02-13T01:11:50Z")

</div>

Nice point @jbudd ....

My solution to that is I have a text editor also open with the code which I am editing it.

Then when I want to go back to where I was, I look at the text editor's screen and where the cursor is.

Yeah, probably a bit messy, but that is an option.  
It doesn't _cost_ too much with resources etc.

And/or:  
I comment out the lines and _time stamp_ them. (Date/hour/minute)  
Do the new stuff and see if it works.

When it is all done, I go along and remove all the old lines.

Also messy, but another option.

---

<div class="post-metadata">

**Author:** ![harmonic7](https://avatars.discourse-cdn.com/v4/letter/h/b5a626/32.png) [@harmonic7](https://discourse.nodered.org/u/harmonic7)\
**Post date:** [13 February 2022 03:16 UTC](https://discourse.nodered.org/t/feature-request-function-node-option-to-save-without-closing/58176/7 "2022-02-13T03:16:07Z")

</div>

> [@knolleary](#):
>
> this topic has been covered many times in the forum - most recently here:

Sorry about that - I didn't realise it had been covered before.

---

<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:** [14 April 2022 03:16 UTC](https://discourse.nodered.org/t/feature-request-function-node-option-to-save-without-closing/58176/8 "2022-04-14T03:16:37Z")

</div>

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