Skip to content

Commit

Permalink
Merge branch 'dev' of github.com:soyjavi/react-toolbox into dev
Browse files Browse the repository at this point in the history
* 'dev' of github.com:soyjavi/react-toolbox:
  Dropdown auto fix
  • Loading branch information
javivelasco committed Nov 30, 2016
2 parents d8a30f3 + 03997da commit a8b4f55
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions components/dropdown/Dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ const factory = (Input) => {
touchend: this.handleDocumentClick
});

open = () => {
open = (event) => {
const client = event.target.getBoundingClientRect();
const screenHeight = window.innerHeight || document.documentElement.offsetHeight;
const up = this.props.auto ? client.top > ((screenHeight / 2) + client.height) : false;
Expand All @@ -101,7 +101,7 @@ const factory = (Input) => {
};

handleClick = (event) => {
this.open();
this.open(event);
events.pauseEvent(event);
if (this.props.onClick) this.props.onClick(event);
};
Expand Down Expand Up @@ -162,7 +162,7 @@ const factory = (Input) => {

handleFocus = event => {
event.stopPropagation();
if (!this.props.disabled) this.open();
if (!this.props.disabled) this.open(event);
if (this.props.onFocus) this.props.onFocus(event);
};

Expand Down

0 comments on commit a8b4f55

Please sign in to comment.