Merge pull request #1269 from MetaMask/notice-fix

Notice fix for when notices are short
This commit is contained in:
Dan Finlay 2017-03-27 13:44:17 -07:00 committed by GitHub
commit a298130357
3 changed files with 8 additions and 1 deletions

View File

@ -2,6 +2,10 @@
## Current Master
## 3.5.1 2017-3-27
- Fix edge case where users were unable to enable the notice button if notices were short enough to not require a scrollbar.
## 3.5.0 2017-3-27
- Add better error messages for when a transaction fails on approval

View File

@ -1,7 +1,7 @@
{
"name": "MetaMask",
"short_name": "Metamask",
"version": "3.5.0",
"version": "3.5.1",
"manifest_version": 2,
"author": "https://metamask.io",
"description": "Ethereum Browser Extension",

View File

@ -92,6 +92,7 @@ Notice.prototype.render = function () {
},
}, [
h(ReactMarkdown, {
className: 'notice-box',
source: body,
skipHtml: true,
}),
@ -114,6 +115,8 @@ Notice.prototype.render = function () {
Notice.prototype.componentDidMount = function () {
var node = findDOMNode(this)
linker.setupListener(node)
if (document.getElementsByClassName('notice-box')[0].clientHeight < 310) { this.setState({disclaimerDisabled: false}) }
}
Notice.prototype.componentWillUnmount = function () {