Can't get relationship input.value by JavaScript

Hello

I’m trying to do something like auto-generating pretty Name for my custom module
The main goal is to do field “Name” auto-generated depended by filling other 3 fields

let contactName = document.getElementById('people_channels_1_name');
let fullName = [];
contactName.onchange = function () {
    fullName[0] = `${this.value} - `;
    channelName.value = fullName.join(' ');
    console.log(fullName);
    console.log('Contact input', contactName);
    console.log('Contact input.value', contactName.value);
};

So my Issue is in the moment when I’m trying to get value from Contacts field (created by a one-to-many relationship) it’s the only problem when I’m trying to select Contacts via PopUp window
and it’s work fine if I just typing the contacts name manually or choose one from the auto-complete

here is a working screenshot if selected from the auto-complete

and it’s doesn’t work if I’m trying to use PopUp for select Contacts

Does it seem like the popup functional didn’t change value?