Skip to content

Commit

Permalink
#287 #314 - Fix for RichText view mode
Browse files Browse the repository at this point in the history
  • Loading branch information
estruyf committed Jul 9, 2019
1 parent a33ae6b commit 9c2eac0
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/controls/richText/RichText.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,15 +137,15 @@ export class RichText extends React.Component<IRichTextProps, IRichTextState> {
if (this.props.isEditMode) {
document.addEventListener('click', this.handleClickOutside);
document.addEventListener('focus', this.handleClickOutside);
}

const clientRect: ClientRect = this._wrapperRef.getBoundingClientRect();
const parentClientRect: ClientRect = this._wrapperRef.parentElement.getBoundingClientRect();
const toolbarTop: number = clientRect.top - parentClientRect.top - TOOLBARPADDING;
const clientRect: ClientRect = this._wrapperRef.getBoundingClientRect();
const parentClientRect: ClientRect = this._wrapperRef.parentElement.getBoundingClientRect();
const toolbarTop: number = clientRect.top - parentClientRect.top - TOOLBARPADDING;

this.setState({
wrapperTop: toolbarTop
});
this.setState({
wrapperTop: toolbarTop
});
}
}

/**
Expand Down

0 comments on commit 9c2eac0

Please sign in to comment.