Merge branch 'dev' of github.com:soyjavi/react-toolbox into dev

* 'dev' of github.com:soyjavi/react-toolbox:
  Dropdown auto fix
old
Javi Velasco 2016-11-30 18:23:43 +01:00
commit a8b4f55901
1 changed files with 3 additions and 3 deletions

View File

@ -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;
@ -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);
};
@ -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);
};