# Prevent overwrite of input text while typing

**URL:** <https://discourse.nodered.org/t/prevent-overwrite-of-input-text-while-typing/56643>\
**Category:** Dashboard\
**Tags:** node-red-dashboard\
**Created:** [14 January 2022 07:54 UTC](https://discourse.nodered.org/t/prevent-overwrite-of-input-text-while-typing/56643 "2022-01-14T07:54:13Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![stgj](https://avatars.discourse-cdn.com/v4/letter/s/e495f1/32.png) [@stgj](https://discourse.nodered.org/u/stgj)\
**Post date:** [14 January 2022 07:54 UTC](https://discourse.nodered.org/t/prevent-overwrite-of-input-text-while-typing/56643/1 "2022-01-14T07:54:13Z")

</div>

Hi,

I have some issues with overwriting input text.

Situation:

An inject node triggers after 1sec and should have an interval of 1-2sec thereafter.

It is wired to a function node. The function node gets a value from global context and sends it to the input text. The input text is then wired to another function node. This function node writes to said global context.

The reason for the continuous interval of the inject node is that said global context can be written to by modbus. So, the input text field must reflect this. Is there a way to prevent the overwrite of the input text field while typing?

Best regards  
Steffen

---

<div class="post-metadata">

**Author:** ![marcus-j-davies](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marcus-j-davies/32/103435_2.png) [@marcus-j-davies](https://discourse.nodered.org/u/marcus-j-davies)\
**Post date:** [14 January 2022 08:05 UTC](https://discourse.nodered.org/t/prevent-overwrite-of-input-text-while-typing/56643/2 "2022-01-14T08:05:51Z")

</div>

I don't use dashboard (which sounds like your using)  
there are better people here then I - I don't have much experience with dashboard, but just a thought.

could you add a switch on the dashboard (to denote you making a change) that blocks any changes to the text box from within the flow - then click the switch again - to re-enable the updates.

or maybe hang a focus event from the text box that does the same thing?

---

<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 January 2022 09:37 UTC](https://discourse.nodered.org/t/prevent-overwrite-of-input-text-while-typing/56643/3 "2022-01-14T09:37:58Z")

</div>

Use a filter (rbe) node to only allow the update msg to be sent to the dashboard if the value from modbus has actually changed.

---

<div class="post-metadata">

**Author:** ![marcus-j-davies](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marcus-j-davies/32/103435_2.png) [@marcus-j-davies](https://discourse.nodered.org/u/marcus-j-davies)\
**Post date:** [14 January 2022 09:59 UTC](https://discourse.nodered.org/t/prevent-overwrite-of-input-text-while-typing/56643/4 "2022-01-14T09:59:57Z")

</div>

Damit!

I always forget about the built in nodes for stuff like this. 😅

---

<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:** [28 January 2022 10:00 UTC](https://discourse.nodered.org/t/prevent-overwrite-of-input-text-while-typing/56643/5 "2022-01-28T10:00:20Z")

</div>

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