Revert "Mobile V3: Beforeunload event removed to maintain consistency"

This reverts commit a0614e7bed004e324339fc08a6b4ccbaad0c6b39.