You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to use RPGUI for a React project, however I am running into an issue where event handlers are not being passed to input fields. On closer inspection it seems the issue lies with the below function:
// copy all event listeners from one element to the other
RPGUI.copy_event_listeners = function(from, to)
{
// copy all event listeners
if (typeof getEventListeners == "function")
{
var events = getEventListeners(from);
for(var p in events) {
events[p].forEach(function(ev) {
// {listener: Function, useCapture: Boolean}
to.addEventListener(p, ev.listener, ev.useCapture);
});
}
}
// now copy all attributes that start with "on"
for (attr in from)
{
if (attr.indexOf("on") === 0)
{
to[attr] = from[attr];
}
}
};
This appears to be because the getEventListeners function is only defined in the console for devtools and is otherwise not available.
Thanks,
The text was updated successfully, but these errors were encountered:
I am trying to use RPGUI for a React project, however I am running into an issue where event handlers are not being passed to input fields. On closer inspection it seems the issue lies with the below function:
This appears to be because the
getEventListeners
function is only defined in the console for devtools and is otherwise not available.Thanks,
The text was updated successfully, but these errors were encountered: