Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clear beforeunload handler after button is pressed #7346

Merged
merged 1 commit into from
Nov 4, 2019

Conversation

Gudahtt
Copy link
Member

@Gudahtt Gudahtt commented Nov 4, 2019

On the signature request and transaction confirmation notification pages, the closure of the notification UI implies that the request has been rejected. However, this rejection is being submitted even when the window is closed as a result of the user explicitly confirming or rejecting. In practice, I suspect this has no effect because the transaction, after being explicitly confirmed or rejected, has already been moved out of a pending state. But just in case there is some present or future edge case that might be affected, the beforeunload handler is now removed once the user has explicitly made a choice.

This mistake was introduced recently in #7333

@Gudahtt Gudahtt closed this Nov 4, 2019
@Gudahtt Gudahtt force-pushed the clear-before-unload-handler-after-button-press branch from 5025baf to 6a4df0d Compare November 4, 2019 15:12
On the signature request and transaction confirmation notification
pages, the closure of the notification UI implies that the request has
been rejected. However, this rejection is being submitted even when the
window is closed as a result of the user explicitly confirming or
rejecting. In practice, I suspect this has no effect because the
transaction, after being explicitly confirmed or rejected, has already
been moved out of a pending state. But just in case there is some
present or future edge case that might be affected, the `beforeunload`
handler is now removed once the user has explicitly made a choice.

This mistake was introduced recently in #7333
@Gudahtt Gudahtt reopened this Nov 4, 2019
@metamaskbot
Copy link
Collaborator

Builds ready [cb3b7cf]

Copy link
Contributor

@whymarrh whymarrh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! I had thought about this when reviewing it but forgot to bring it up before it got merged.

@Gudahtt Gudahtt merged commit dbd14d7 into develop Nov 4, 2019
@whymarrh whymarrh deleted the clear-before-unload-handler-after-button-press branch November 4, 2019 21:31
tmashuang pushed a commit that referenced this pull request Nov 4, 2019
On the signature request and transaction confirmation notification
pages, the closure of the notification UI implies that the request has
been rejected. However, this rejection is being submitted even when the
window is closed as a result of the user explicitly confirming or
rejecting. In practice, I suspect this has no effect because the
transaction, after being explicitly confirmed or rejected, has already
been moved out of a pending state. But just in case there is some
present or future edge case that might be affected, the `beforeunload`
handler is now removed once the user has explicitly made a choice.

This mistake was introduced recently in #7333
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants