# Function editor highlights text arbitrarily?

**URL:** <https://discourse.nodered.org/t/function-editor-highlights-text-arbitrarily/85571>\
**Category:** General\
**Created:** [15 February 2024 16:45 UTC](https://discourse.nodered.org/t/function-editor-highlights-text-arbitrarily/85571 "2024-02-15T16:45:10Z")\
**Posts on this page:** 5\
**Page:** 3

<div class="post-metadata">

**Author:** ![Rgrove](https://avatars.discourse-cdn.com/v4/letter/r/5f8ce5/32.png) [@Rgrove](https://discourse.nodered.org/u/Rgrove)\
**Post date:** [21 February 2024 17:40 UTC](https://discourse.nodered.org/t/function-editor-highlights-text-arbitrarily/85571/41 "2024-02-21T17:40:45Z")

</div>

Minor follow up I just noticed on a recent deployment on an Ubuntu machine at my dad's. Version 3.1.4:

This behavior is NOT present.

The behavior is still present on my home Ubuntu machine.

---

<div class="post-metadata">

**Author:** ![Bobo](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bobo/32/8401_2.png) [@Bobo](https://discourse.nodered.org/u/Bobo)\
**Post date:** [28 March 2024 09:48 UTC](https://discourse.nodered.org/t/function-editor-highlights-text-arbitrarily/85571/42 "2024-03-28T09:48:55Z")

</div>

> [@Colin](#):
>
> It seems that for @Rgrove every time he opens the function editor and then clicks in the code the text between the initial cursor position and where he clicks is selected and highlighted.

I am seeing this exact same behaviour as well. It is very annoying. Has it been logged as a bug?

---

<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:** [28 March 2024 09:51 UTC](https://discourse.nodered.org/t/function-editor-highlights-text-arbitrarily/85571/43 "2024-03-28T09:51:24Z")

</div>

I don't think it is consistently reproducible. Have you tried accessing Node-RED in an in-private browsing session with no browser extensions? I'm fairly sure that it is a browser and/or OS issue not a Node-RED one, I've had it occasionally in the past myself but I can't remember the reason.

---

<div class="post-metadata">

**Author:** ![Bobo](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bobo/32/8401_2.png) [@Bobo](https://discourse.nodered.org/u/Bobo)\
**Post date:** [28 March 2024 09:57 UTC](https://discourse.nodered.org/t/function-editor-highlights-text-arbitrarily/85571/44 "2024-03-28T09:57:26Z")

</div>

Just tried your suggestions, but alas the issue remains. This is on Windows 10 - Firefox.

But I agree, must be some combo of OS/Browser.

I just tried with Chrome, and am getting the same behaviour! 😬

---

<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:** [26 June 2024 09:57 UTC](https://discourse.nodered.org/t/function-editor-highlights-text-arbitrarily/85571/45 "2024-06-26T09:57:44Z")

</div>

Closed on 26 June 2024 09:57 UTC

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

[Previous page](https://discourse.nodered.org/t/function-editor-highlights-text-arbitrarily/85571.md?page=2)
