Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
componentDidMount () {
if (!this._input) {
return
}
// https://connect.microsoft.com/IE/Feedback/Details/856998
this.inputListener = addEventListener(this._input, 'input', this.handleChange)
this.changeListener = addEventListener(this._input, 'change', this.handleChange)
}
componentDidMount () {
if (!this._input) {
return
}
// https://connect.microsoft.com/IE/Feedback/Details/856998
this.inputListener = addEventListener(this._input, 'input', this.handleChange)
this.changeListener = addEventListener(this._input, 'change', this.handleChange)
}
setupScopedFocus (el, liveRegion) {
if (this.contextElement) {
warning(
false,
`
Focus is already scoped to ${this.contextElement}.
`
)
return
}
this.contextElement = findDOMNode(el)
this.listeners.push(addEventListener(ownerWindow(this.contextElement), 'blur', this.handleBlur, false))
this.listeners.push(addEventListener(ownerDocument(this.contextElement), 'focus', this.handleFocus, true))
this.screenReaderFocusRegion.isolateRegion(this.contextElement, liveRegion)
}
setupScopedFocus (el, liveRegion) {
if (this.contextElement) {
warning(
false,
`
Focus is already scoped to ${this.contextElement}.
`
)
return
}
this.contextElement = findDOMNode(el)
this.listeners.push(addEventListener(ownerWindow(this.contextElement), 'blur', this.handleBlur, false))
this.listeners.push(addEventListener(ownerDocument(this.contextElement), 'focus', this.handleFocus, true))
this.screenReaderFocusRegion.isolateRegion(this.contextElement, liveRegion)
}
autoGrow () {
if (this.props.autoGrow) {
if (!this._debounced) {
this._debounced = debounce(this.grow, 200, {leading: false, trailing: true})
}
if (!this._listener) {
this._listener = addEventListener(window, 'resize', this._debounced)
}
this._request = requestAnimationFrame(this._debounced)
}
}