remove textarea-caret npm package
This commit is contained in:
parent
749e2eac0b
commit
bdbf01704d
|
@ -5,7 +5,6 @@ const connect = require('react-redux').connect
|
|||
const h = require('react-hyperscript')
|
||||
const actions = require('../../../ui/app/actions')
|
||||
const Tooltip = require('../components/tooltip')
|
||||
const getCaretCoordinates = require('textarea-caret')
|
||||
|
||||
module.exports = connect(mapStateToProps)(InitializeMenuScreen)
|
||||
|
||||
|
@ -176,14 +175,3 @@ InitializeMenuScreen.prototype.createNewVaultAndKeychain = function () {
|
|||
|
||||
this.props.dispatch(actions.createNewVaultAndKeychain(password))
|
||||
}
|
||||
|
||||
InitializeMenuScreen.prototype.inputChanged = function (event) {
|
||||
// tell mascot to look at page action
|
||||
var element = event.target
|
||||
var boundingRect = element.getBoundingClientRect()
|
||||
var coordinates = getCaretCoordinates(element, element.selectionEnd)
|
||||
this.animationEventEmitter.emit('point', {
|
||||
x: boundingRect.left + coordinates.left - element.scrollLeft,
|
||||
y: boundingRect.top + coordinates.top - element.scrollTop,
|
||||
})
|
||||
}
|
||||
|
|
|
@ -3,7 +3,6 @@ const Component = require('react').Component
|
|||
const h = require('react-hyperscript')
|
||||
const connect = require('react-redux').connect
|
||||
const actions = require('../../ui/app/actions')
|
||||
const getCaretCoordinates = require('textarea-caret')
|
||||
const log = require('loglevel')
|
||||
const EventEmitter = require('events').EventEmitter
|
||||
|
||||
|
|
|
@ -30525,11 +30525,6 @@
|
|||
"resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz",
|
||||
"integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ="
|
||||
},
|
||||
"textarea-caret": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/textarea-caret/-/textarea-caret-3.0.2.tgz",
|
||||
"integrity": "sha1-82DEhpmqGr9xhoCkOjGoUGZcLK8="
|
||||
},
|
||||
"textextensions": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/textextensions/-/textextensions-1.0.2.tgz",
|
||||
|
|
|
@ -202,7 +202,6 @@
|
|||
"superstatic": "^5.0.2",
|
||||
"sw-controller": "^1.0.3",
|
||||
"sw-stream": "^2.0.2",
|
||||
"textarea-caret": "^3.0.1",
|
||||
"valid-url": "^1.0.9",
|
||||
"vreme": "^3.0.2",
|
||||
"web3": "^0.20.1",
|
||||
|
|
|
@ -4,7 +4,6 @@ import Button from '@material-ui/core/Button'
|
|||
import TextField from '../../text-field'
|
||||
import { ENVIRONMENT_TYPE_POPUP } from '../../../../../app/scripts/lib/enums'
|
||||
import { getEnvironmentType } from '../../../../../app/scripts/lib/util'
|
||||
import getCaretCoordinates from 'textarea-caret'
|
||||
import { EventEmitter } from 'events'
|
||||
import { DEFAULT_ROUTE, RESTORE_VAULT_ROUTE } from '../../../routes'
|
||||
|
||||
|
@ -68,15 +67,6 @@ export default class UnlockPage extends Component {
|
|||
|
||||
handleInputChange ({ target }) {
|
||||
this.setState({ password: target.value, error: null })
|
||||
|
||||
// tell mascot to look at page action
|
||||
const element = target
|
||||
const boundingRect = element.getBoundingClientRect()
|
||||
const coordinates = getCaretCoordinates(element, element.selectionEnd)
|
||||
this.animationEventEmitter.emit('point', {
|
||||
x: boundingRect.left + coordinates.left - element.scrollLeft,
|
||||
y: boundingRect.top + coordinates.top - element.scrollTop,
|
||||
})
|
||||
}
|
||||
|
||||
renderSubmitButton () {
|
||||
|
|
|
@ -5,7 +5,6 @@ const connect = require('react-redux').connect
|
|||
const h = require('react-hyperscript')
|
||||
const actions = require('../actions')
|
||||
const Tooltip = require('../components/tooltip')
|
||||
const getCaretCoordinates = require('textarea-caret')
|
||||
const { RESTORE_VAULT_ROUTE, DEFAULT_ROUTE } = require('../routes')
|
||||
const { getEnvironmentType } = require('../../../app/scripts/lib/util')
|
||||
const { ENVIRONMENT_TYPE_POPUP } = require('../../../app/scripts/lib/enums')
|
||||
|
@ -162,17 +161,6 @@ class InitializeMenuScreen extends Component {
|
|||
.then(() => history.push(DEFAULT_ROUTE))
|
||||
}
|
||||
|
||||
inputChanged (event) {
|
||||
// tell mascot to look at page action
|
||||
var element = event.target
|
||||
var boundingRect = element.getBoundingClientRect()
|
||||
var coordinates = getCaretCoordinates(element, element.selectionEnd)
|
||||
this.animationEventEmitter.emit('point', {
|
||||
x: boundingRect.left + coordinates.left - element.scrollLeft,
|
||||
y: boundingRect.top + coordinates.top - element.scrollTop,
|
||||
})
|
||||
}
|
||||
|
||||
showRestoreVault () {
|
||||
this.props.markPasswordForgotten()
|
||||
if (getEnvironmentType(window.location.href) === ENVIRONMENT_TYPE_POPUP) {
|
||||
|
|
Loading…
Reference in New Issue