Make event onInActive works same way on iOS and Android.