Ah, well, you might have spotted an inconsistency in the documentation
In fact, I can confirm that sending something with msg._ui or msg._uib (which lets you control the client from Node-RED) will both trigger onChange. This is to do with uibuilder client's internal event handling.
You could use the onTopic handler if you have a specific topic you want to monitor.
Would there be interest in an onMsg function that didn't trigger on msg._ui or msg._uib? Or would that be more confusing? Or perhaps I SHOULD exclude them from the onChange handling?
So thinking out loud, Are messages with msg._ui likely to be used by OnChange functions ?
I guess only other users could answer that, to me the way it's documented makes more sense.
In this case, I would expect an onMsg function should listen for ALL messages, and allow the user to handle as required.
If you filter out _uib wouldn't this then cause problems, if messages are being re-routed back to uibuilder node to update other clients ?
No, no, absolutely not! How can you even suggest such a thing - of course it was a "late design decision".
I think you are right.
Yes, again correct.
OK, decision made - I'll update for the next release so that any input message that includes a msg._ui does not trigger the onChange('msg', ....) function. I will probably do the same for messages containing a msg._uib property but I just need to double-check that doesn't have any unintended effects.