Custom UI: Reference macro doesn't bubble change event when handler defined on g:ui_reference tag


When adding an onchange attribute to a reference macro (using the g:ui_reference), the onchange listener is not triggered when the value of the reference macro is set via an ATF step Set Component Values (Custom UI) or via the Page Inspector.

Steps to Reproduce

1. Create a sys_ui_page with the following content:
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<g:ui_reference name="usrrequestor" query="active=true" id="usrrequestor" table="sys_user" value="" onchange="console.log('### OnChange Fired');"/>

2. Open the ui page and open the ATF Page Crawler
3. Select the element and set its value to any value
4. Look at the console

Behavior: Console logs do not contain "### OnChange Fired"
Expected: Console logs should contain that log statement


A change event is fired from a different, not-instrumented, element of the reference macro's expansion. This change event bubbles and can be caught via an element which holds the reference macro (such as a div). When manually setting the reference macro's value, this event is fired when clicking away from the reference macro after setting its value.

Related Problem: PRB1442253