fix UI thread deadlock during call NavBar API from JS