Invoke the “onEnter” function by the other way
Merge pull request #4827 from samuele3hu/masterFix

Invoke the “onEnter” function by the other way