Skip to content

Commit

Permalink
Added global.window context to getComputedStyle() reference
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Lane committed Feb 19, 2016
1 parent c01e9ac commit f6f89d4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/Autocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,6 @@ let Autocomplete = React.createClass({
}, () => {
//this.refs.input.focus() // TODO: file issue
this.refs.input.setSelectionRange(
this.state.value.length,
this.state.value.length
)
this.props.onSelect(this.state.value, item)
Expand Down Expand Up @@ -220,7 +219,7 @@ let Autocomplete = React.createClass({
setMenuPositions () {
var node = this.refs.input
var rect = node.getBoundingClientRect()
var computedStyle = getComputedStyle(node)
var computedStyle = global.window.getComputedStyle(node)
var marginBottom = parseInt(computedStyle.marginBottom, 10)
var marginLeft = parseInt(computedStyle.marginLeft, 10)
var marginRight = parseInt(computedStyle.marginRight, 10)
Expand Down

0 comments on commit f6f89d4

Please sign in to comment.