Skip to content

Commit

Permalink
Remove the link offset
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad committed May 23, 2018
1 parent 5ab713a commit 491828d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions editor/components/rich-text/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -446,11 +446,10 @@ export class RichText extends Component {
getFocusPosition( position ) {
// The container is relatively positioned.
const containerPosition = this.containerRef.current.getBoundingClientRect();
const toolbarOffset = { top: 10, left: 0 };

return {
top: position.top - containerPosition.top + ( position.height ) + toolbarOffset.top,
left: position.left - containerPosition.left + ( position.width / 2 ) + toolbarOffset.left,
top: position.top - containerPosition.top + position.height,
left: position.left - containerPosition.left + ( position.width / 2 ),
};
}

Expand Down

0 comments on commit 491828d

Please sign in to comment.