This may not be the complete answer, as there are many differences in how the elements and events are handled by the browser controls, but part of the problem can be attributed to the isTrusted property of the Event object. Take a look here: https://developer.mozilla.org/fr/docs/Web/API/Event/isTrusted
You can see that there is a difference between the browser between them:
In Firefox, an event is trusted if it is called by the user, and not if it is called by a script.
In Internet Explorer, all events are trusted, except for those that are in the created using the createEvent () method.
Chrome does not support this property.
And if you look what isTrusted means: http://www.w3.org/TR/2012/WD-DOM-Level-3-Events-20120614/#trusted-events
Events that are generated by the user agent, either as a result of user interaction or as a direct result of changes in the DOM, are trusted by the user agent with privileges that are not granted events generated by the script through DocumentEvent.createEvent ("Event"), modified using Event.initEvent () or sent via the EventTarget.dispatchEvent () Method. The isTrusted attribute of trusted events is true, and untrusted events have the isTrusted attribute value of false.
Most untrusted events should not trigger default actions, but throw click or DOMActivate events. These events trigger the default activation trigger action (see Activation and behavior triggers for more details); these untrusted events have the isTrusted attribute value false, but still trigger any default action for backward compatibility. All other untrusted events should behave as if the Event.preventDefault () method was called in this event.
Basically, a script-generated event, at least in Firefox, doesn't necessarily behave exactly like an event created by a user. You can use it to trigger default behavior, such as checking a checkbox or by reference, but in many cases it will not do the same as actually generating the event through the interface. It will be launched, but with limitations.
Again, perhaps there is a way to achieve what you are trying to, I’m not quite sure that this is the cause of this particular problem, but it’s pretty clear from the specifications that mimic user interaction with scripts, it’s not guaranteed to work.