Skip to content

Clear beforeunload handler after button is pressed#7346

Merged
Gudahtt merged 1 commit intodevelopfrom
clear-before-unload-handler-after-button-press
Nov 4, 2019
Merged

Clear beforeunload handler after button is pressed#7346
Gudahtt merged 1 commit intodevelopfrom
clear-before-unload-handler-after-button-press

Conversation

@Gudahtt
Copy link
Copy Markdown
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
Copy Markdown
Collaborator

Builds ready [cb3b7cf]

Copy link
Copy Markdown
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