Deviceoritentation issue in ios 12.2

I have added some function inside the device orientation event. The event not fired in ios 12.2 and 12.3. But the event is fired in 12.1. Is this due to the security updates introduced in safari in ios 12.2? If yes, is there any solution for this issue??. How can I trigger the device orientation event in ios 12.2 version?