As far as what events occur when you open a select menu there are many. There may very well be a way to create your own CustomEvent and fire it by tracking the other events. If you can see what events are happening, you might be able to figure something out. This is a script I use to find all events that are occurring on an EventTarget:
EventTarget.prototype.__original_addEventListener = EventTarget.prototype.addEventListener;
EventTarget.prototype.addEventListener = function(listener, callback) {
if (listener === 'event') {
for (let key in this) {
if (key.startsWith('on')) {
let eventName = key.substr(2, key.length);
this.__original_addEventListener(eventName,
function(e) {
callback(e);
});
}
}
} else {
this.__original_addEventListener(listener, callback);
}
};
window.onload = function() {
document.querySelector('#id-of-my-select-tag').addEventListener('event', (e) => {
console.log(e.type);
});
};
This just allows you to add a listener called 'event' which captures all events. This will output all the events happening and maybe you will see a pattern that helps you write some code to detect when it is open based on the events that occurred and the order in which they occurred. (Tested in Firefox, Chrome and Edge)