Skip to content

[R16] UncontrolledTooltip, Tooltip Error when Active in React 16 #548

@virgofx

Description

@virgofx

When hovering over a Tooltip or UncontrolledTooltip using the default sample code for these components from docs, an error will occur in React16 as follows: (Note this is specific to React 16 and not thrown in React 15):

reactstrap.es.js:715 Uncaught TypeError: Cannot read property 'focus' of undefined
    at TetherContent.show (reactstrap.es.js:715)
    at TetherContent.handleProps (reactstrap.es.js:681)
    at TetherContent.componentDidMount (reactstrap.es.js:632)
    at commitLifeCycles (react-dom.js:11925)
    at commitAllLifeCycles (react-dom.js:12707)
    at HTMLUnknownElement.callCallback (react-dom.js:1543)
    at Object.invokeGuardedCallbackDev (react-dom.js:1582)
    at invokeGuardedCallback (react-dom.js:1439)
    at commitAllWork (react-dom.js:12828)
    at workLoop (react-dom.js:13100)

The above error occurred in the <TetherContent> component:
    in TetherContent (created by Tooltip)
    in Tooltip (created by UncontrolledTooltip)
    in UncontrolledTooltip (created by <App Component>)
    in span ...

If the tooltip component is switching away from Tether to Popper then whoever does that PR if they'd be so kind to include testing with latest React16.x and fix this at same time.

  • Reactstrap: 4.8.0
  • React: 16.0.0-beta.5
  • Components: Tooltip, UncontrolledTooltip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions