fix(*): fixes #1021 - beforeUnload handler triggers confirm dialog unnecessarily