Skip to content

Commit

Permalink
style: code format
Browse files Browse the repository at this point in the history
  • Loading branch information
silentcloud committed Oct 18, 2017
1 parent 8cc2f65 commit fe1df75
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Trigger.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,13 @@ export default class Trigger extends React.Component<ITriggerProps & IProptypes,
componentDidUpdate() {
this.renderDialog(this.props.visible);
if (this.props.visible) {
let currentDocument;
// always hide on mobile
if (!this.touchOutsideHandler) {
currentDocument = currentDocument || this.props.getDocument!();
// add setTimeout for preact
setTimeout(() =>
this.touchOutsideHandler = addEventListener(currentDocument, 'click', this.onDocumentClick));
setTimeout(() => {
const currentDocument = this.props.getDocument!();
this.touchOutsideHandler = addEventListener(currentDocument, 'click', this.onDocumentClick);
});
}
return;
}
Expand Down

0 comments on commit fe1df75

Please sign in to comment.