Correctly position tooltips relative to parent element.
This commit is contained in:
parent
c198dd381f
commit
9fc7435ea2
3 changed files with 11 additions and 11 deletions
|
@ -66,7 +66,7 @@ module.exports = React.createClass({
|
|||
// positioned, also taking into account any window zoom
|
||||
// NOTE: The additional 6 pixels for the left position, is to take account of the
|
||||
// tooltips chevron
|
||||
var parent = ReactDOM.findDOMNode(this);
|
||||
var parent = ReactDOM.findDOMNode(this).parentNode;
|
||||
var style = {};
|
||||
style.top = parent.getBoundingClientRect().top + window.pageYOffset;
|
||||
style.left = 6 + parent.getBoundingClientRect().right + window.pageXOffset;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue