rc-tooltip
Advanced tools
Comparing version 2.0.2 to 2.0.3
@@ -40,3 +40,3 @@ 'use strict'; | ||
if (props.visible) { | ||
var wrapDomNode = React.findDOMNode(props.wrap); | ||
var targetDomNode = React.findDOMNode(props.wrap).firstChild; | ||
var popupDomNode = this.getRootNode(); | ||
@@ -46,3 +46,3 @@ var placement = props.placement; | ||
if (placement && placement.points) { | ||
var align = domAlign(popupDomNode, wrapDomNode, placement); | ||
var align = domAlign(popupDomNode, targetDomNode, placement); | ||
popupDomNode.className = utils.getToolTipClassByPlacement(props.prefixCls, align); | ||
@@ -58,3 +58,3 @@ } else { | ||
} | ||
domAlign(popupDomNode, wrapDomNode, { | ||
domAlign(popupDomNode, targetDomNode, { | ||
points: points | ||
@@ -61,0 +61,0 @@ }); |
@@ -54,6 +54,6 @@ 'use strict'; | ||
value: function handleDocumentClick(e) { | ||
var wrap = React.findDOMNode(this); | ||
var targetDomNode = React.findDOMNode(this).firstChild; | ||
var popupDomNode = this.getPopupDomNode(); | ||
var target = e.target; | ||
if (target !== wrap && target !== popupDomNode && !contains(popupDomNode, target) && !contains(wrap, target)) { | ||
if (target !== targetDomNode && target !== popupDomNode && !contains(popupDomNode, target) && !contains(targetDomNode, target)) { | ||
this.setVisible(false); | ||
@@ -126,3 +126,4 @@ } | ||
key: 'toggle', | ||
value: function toggle() { | ||
value: function toggle(e) { | ||
e.preventDefault(); | ||
if (this.state.visible) { | ||
@@ -129,0 +130,0 @@ this.hide(); |
{ | ||
"name": "rc-tooltip", | ||
"version": "2.0.2", | ||
"version": "2.0.3", | ||
"description": "tooltip ui component for react", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
21073
418