@@ -297,6 +297,13 @@ class ReactTooltip extends React.Component {
297297 scrollHide = this . props . scrollHide
298298 }
299299
300+ // Make sure the correct place is set
301+ let desiredPlace = e . currentTarget . getAttribute ( 'data-place' ) || this . props . place || 'top'
302+ let effect = switchToSolid && 'solid' || this . getEffect ( e . currentTarget )
303+ let offset = e . currentTarget . getAttribute ( 'data-offset' ) || this . props . offset || { }
304+ let result = getPosition ( e , e . currentTarget , ReactDOM . findDOMNode ( this ) , desiredPlace , desiredPlace , effect , offset )
305+ let place = result . isNewState ? result . newState . place : desiredPlace
306+
300307 // To prevent previously created timers from triggering
301308 this . clearTimer ( )
302309
@@ -310,11 +317,11 @@ class ReactTooltip extends React.Component {
310317 self . setState ( {
311318 originTooltip : originTooltip ,
312319 isMultiline : isMultiline ,
313- desiredPlace : target . getAttribute ( 'data-place' ) || self . props . place || 'top' ,
314- place : target . getAttribute ( 'data- place' ) || self . props . place || 'top' ,
320+ desiredPlace : desiredPlace ,
321+ place : place ,
315322 type : target . getAttribute ( 'data-type' ) || self . props . type || 'dark' ,
316- effect : switchToSolid && 'solid' || self . getEffect ( target ) ,
317- offset : target . getAttribute ( 'data- offset' ) || self . props . offset || { } ,
323+ effect : effect ,
324+ offset : offset ,
318325 html : target . getAttribute ( 'data-html' ) ? target . getAttribute ( 'data-html' ) === 'true' : self . props . html || false ,
319326 delayShow : target . getAttribute ( 'data-delay-show' ) || self . props . delayShow || 0 ,
320327 delayHide : target . getAttribute ( 'data-delay-hide' ) || self . props . delayHide || 0 ,
0 commit comments