diff --git a/CHANGELOG.md b/CHANGELOG.md index d15910aa3..633374a91 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ ## Current Develop Branch +## 7.5.2 Thu Nov 14 2019 +- [#7414](https://github.com/MetaMask/metamask-extension/pull/7414): Ensure SignatureRequestOriginal 'beforeunload' handler is bound + ## 7.5.1 Tuesday Nov 13 2019 - [#7402](https://github.com/MetaMask/metamask-extension/pull/7402): Fix regression for signed types data screens - [#7390](https://github.com/MetaMask/metamask-extension/pull/7390): Update json-rpc-engine diff --git a/app/manifest.json b/app/manifest.json index 2ffca545a..c863b973e 100644 --- a/app/manifest.json +++ b/app/manifest.json @@ -1,7 +1,7 @@ { "name": "__MSG_appName__", "short_name": "__MSG_appName__", - "version": "7.5.1", + "version": "7.5.2", "manifest_version": 2, "author": "https://metamask.io", "description": "__MSG_appDescription__", diff --git a/ui/app/components/app/signature-request-original.js b/ui/app/components/app/signature-request-original.js index 60b910eb0..e23d724cb 100644 --- a/ui/app/components/app/signature-request-original.js +++ b/ui/app/components/app/signature-request-original.js @@ -101,9 +101,10 @@ function SignatureRequest (props) { this.state = { selectedAccount: props.selectedAccount, } + this._beforeUnload = this._beforeUnload.bind(this) } -SignatureRequest.prototype._beforeUnload = (event) => { +SignatureRequest.prototype._beforeUnload = function (event) { const { clearConfirmTransaction, cancel } = this.props const { metricsEvent } = this.context metricsEvent({ @@ -117,7 +118,7 @@ SignatureRequest.prototype._beforeUnload = (event) => { cancel(event) } -SignatureRequest.prototype._removeBeforeUnload = () => { +SignatureRequest.prototype._removeBeforeUnload = function () { if (getEnvironmentType(window.location.href) === ENVIRONMENT_TYPE_NOTIFICATION) { window.removeEventListener('beforeunload', this._beforeUnload) }