1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 01:39:44 +01:00
This commit is contained in:
Dan Finlay 2016-08-25 14:23:41 -07:00
parent a8e40ffe7a
commit 6f082dd9e7

View File

@ -1,7 +1,7 @@
const inherits = require('util').inherits
const Component = require('react').Component
const defaultKey = 'persistent-form-default'
const eventName = 'keyup'//.persistent-form-change'//.persistent-form-change'
const eventName = 'keyup'
module.exports = PersistentForm
@ -16,7 +16,6 @@ PersistentForm.prototype.componentDidMount = function () {
const store = this.getPersistentStore()
fields.forEach((field) => {
const key = field.getAttribute('data-persistent-formid')
const val = field.value
const cached = store[key]
if (cached !== undefined) {
field.value = cached
@ -51,7 +50,6 @@ PersistentForm.prototype.persistentFieldDidUpdate = function (event) {
PersistentForm.prototype.componentWillUnmount = function () {
const fields = document.querySelectorAll('[data-persistent-formid]')
const store = this.getPersistentStore()
fields.forEach((field) => {
field.removeEventListener(eventName, this.persistentFieldDidUpdate.bind(this))
})