Prevent page change while editing