mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Merge pull request #4711 from alextsg/network-remove-provider-engine
Fix notice screen incorrectly disabling Accept button after multiple …
This commit is contained in:
commit
c30ee58e61
@ -116,12 +116,25 @@ Notice.prototype.render = function () {
|
||||
)
|
||||
}
|
||||
|
||||
Notice.prototype.setInitialDisclaimerState = function () {
|
||||
if (document.getElementsByClassName('notice-box')[0].clientHeight < 310) {
|
||||
this.setState({disclaimerDisabled: false})
|
||||
}
|
||||
}
|
||||
|
||||
Notice.prototype.componentDidMount = function () {
|
||||
// eslint-disable-next-line react/no-find-dom-node
|
||||
var node = findDOMNode(this)
|
||||
linker.setupListener(node)
|
||||
if (document.getElementsByClassName('notice-box')[0].clientHeight < 310) {
|
||||
this.setState({disclaimerDisabled: false})
|
||||
this.setInitialDisclaimerState()
|
||||
}
|
||||
|
||||
Notice.prototype.componentDidUpdate = function (prevProps) {
|
||||
const { notice: { id } = {} } = this.props
|
||||
const { notice: { id: prevNoticeId } = {} } = prevProps
|
||||
|
||||
if (id !== prevNoticeId) {
|
||||
this.setInitialDisclaimerState()
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user