Looking for a dispatchEvent alternative for iOS that allows me to emit an event.
dispatchEvent() is working fine for desktops and most of the devices.
But it is not seems to be working for iOS mobile devices.
Is there an alternative?
Below is my code:
const event = new KeyboardEvent('keyup', {
view: window,
which: ENTER_KEY_CODE,
keyCode: ENTER_KEY_CODE,
bubbles: true,
cancelable: true,
});
document.querySelector('.free-text-search input').dispatchEvent(event);