Function editing with iPad broken [solved, actually not iPad-related]

I can no longer select function code when editing it from an iOS device. Node-RED's context popup overrides iOS's. Every once in a while I need to edit flows through a VPN while I am on the road and until recently (definitely before 2.0) it wasn't an issue.

Should this be considered a bug, is there a workaround?

Can you explain what you mean here? Which context popup are you referring to?

Have you enabled the monaco text editor that was added in 2.0? Or are you using the default one?

Thanks for your response, Nick. I used the old editor and whenever I tried to select text an elipsis appeared that apparently came from Node-RED rather than the expected iOS copy/paste context menu.

I now activated the monaco editor and it seems I cannot interact with the text at all. The iOS context menu comes up but nothing I try affects the text. Typing also doesn't work. The on-screen keyboard comes up but no characters make it to the text box. It is very weird.

I can confirm, you can copy the text but not insert it. No 'Paste' option shows up.

Node-Red v2.1.3 running on macOS v 12.0.1
iPad Pro (3rd generation) software v15.0.2

Paul, how does Monaco perform on your device? Can you try typing etc.

Ok with the monaco editor you can 'sort of' copy/paste.

If you double tap a word, and release it will select that word (and highlife all other occurrences). Now if you long hold that word (say two seconds) and release it a popup comes up with options and 'copy' is one of them.

You can now long press some where else in the code and the popup will again show and you can select paste and it will paste it there.

However I could not figure out how to select more than one word at a time.

Here is a screen recording of my trying to edit a function using the monaco editor from an iPad (iPadOS 15.0.2, Node-RED 2.1.3).

What other nodes do you have installed?

on your node-red server, open ~/.node-red/package.json & copy the dependencies

There reason on ask is because there are know contrib nodes that pollute certain prototypes and cause script errors for monaco.

Also, does apple/ios now allow alternative keyboards? On Android monaco is glitchy with gboard but there are others (like "programmers keyboards") that dont try to do prediction etc & thus dont upset monaco.

@zenofmud could you type inside monaco on your iPad?

@Steve-Mcl Yes I can type in using the iPad and using monaco

If I am the only user reporting this then it is most likely something in my environment. I can live with that and dig deeper myself. Still, if it helps, here's my dependencies:

"dependencies": {
    "alexa-remote2": "github:Apollon77/alexa-remote",
    "node-red-contrib-alexa-remote2": "~3.10.4",
    "node-red-contrib-aws": "~0.7.0",
    "node-red-contrib-bigtimer": "~2.3.1",
    "node-red-contrib-bigtimer2": "file:../src/node-red-contrib-bigtimer2",
    "node-red-contrib-counter": "~0.1.5",
    "node-red-contrib-dns": "0.0.4",
    "node-red-contrib-dnsquery": "~1.0.6",
    "node-red-contrib-eztimer": "~1.2.4",
    "node-red-contrib-fritz": "~1.4.5",
    "node-red-contrib-fritzapi": "~0.3.0",
    "node-red-contrib-homeconnect": "~0.6.3",
    "node-red-contrib-iconv": "0.0.3",
    "node-red-contrib-image-output": "~0.6.2",
    "node-red-contrib-image-tools": "~1.4.0",
    "node-red-contrib-influxdb": "~0.6.0",
    "node-red-contrib-looptimer": "0.0.8",
    "node-red-contrib-miio-roborock": "~2.2.3",
    "node-red-contrib-moment": "~4.0.0",
    "node-red-contrib-owntracks": "0.0.2",
    "node-red-contrib-play-audio": "^2.5.0",
    "node-red-contrib-power-monitor": "~0.1.2",
    "node-red-contrib-pushover": "~0.2.0",
    "node-red-contrib-rss": "~0.1.6",
    "node-red-contrib-syslog": "~1.1.0",
    "node-red-contrib-time-range-switch": "~1.0.1",
    "node-red-contrib-timed-counter": "0.0.4",
    "node-red-contrib-timeouttrigger": "0.0.2",
    "node-red-contrib-timerswitch": "~1.3.0",
    "node-red-contrib-watt2kwh": "~0.1.1",
    "node-red-contrib-web-worldmap": "~2.16.1",
    "node-red-contrib-wled3": "~2.5.1",
    "node-red-contrib-xiaomi-roborock": "0.0.2",
    "node-red-dashboard": "~3.0.4",
    "node-red-node-email": "~1.12.1",
    "node-red-node-feedparser": "~0.2.1",
    "node-red-node-geofence": "~0.3.1",
    "node-red-node-mysql": "~0.1.9",
    "node-red-node-pi-gpio": "^1.2.3",
    "node-red-node-ping": "^0.3.1",
    "node-red-node-random": "^0.4.0",
    "node-red-node-serialport": "^0.14.1",
    "node-red-node-smooth": "^0.1.2",
    "nodered-contrib-signal-client": "~2.4.2"
}

Hi, I had a quick look through & noticed this...

When monaco was first released, we noticed a hand full of contrib nodes were using an old (bad) version of something called multiple-select.js - where the user could not type.

node-red-contrib-miio-roborock has a local copy of this multiple-select lib but it was updated to V1.5.2 7 days ago.

Try updating that contrib node.

On a related note, does monaco work in a regular PC browser?

1 Like

I am now back at home and noticed that it was not iPad-related and that I also couldn't edit from a PC. I removed node-red-contrib-miio-roborock completely (I wasn't using it anyway), restarted Node-RED and reloaded the interface and now I can edit function code again.

Thanks Steve!

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