question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Tooltip gives me console errors

See original GitHub issue

I’m using react-bootstrap 1.6.1 with the Tooltip component. It is functional, however, I get the following error in the console every time the OverlayTrigger is moused over:

Popper: modifier “popoverArrowMargins” provided an invalid “fn” property, expected “function” but got “undefined” at https://lacolhost.com:3000/static/js/vendors~main.chunk.js:136717:20 at Overlay (https://lacolhost.com:3000/static/js/vendors~main.chunk.js:131862:22) at OverlayTrigger (https://lacolhost.com:3000/static/js/vendors~main.chunk.js:132001:22) at PromoDetailsModal (https://lacolhost.com:3000/static/js/main.chunk.js:10961:3) at div …

The following code produces the error:

import { OverlayTrigger, Tooltip } from 'react-bootstrap';

const PromoDetailsModal = () => {
  const renderTooltip = props => (
    <Tooltip id="button-tooltip" {...props}>
      Price details
    </Tooltip>
  );

  return (
    <OverlayTrigger overlay={renderTooltip}>
      <h1>Hover for price details</h1>
    </OverlayTrigger>
  );
};

export default PromoDetailsModal;

Here is my package.json dependencies in case that is relevant:

{
  "dependencies": {
    "@babel/runtime": "^7.12.5",
    "@fortawesome/fontawesome-svg-core": "^1.2.34",
    "@fortawesome/free-brands-svg-icons": "^5.15.2",
    "@fortawesome/free-regular-svg-icons": "^5.15.2",
    "@fortawesome/free-solid-svg-icons": "^5.15.2",
    "@fortawesome/react-fontawesome": "^0.1.14",
    "@paypal/react-paypal-js": "^7.1.0",
    "@reduxjs/toolkit": "^1.5.0",
    "@styled-icons/crypto": "^10.25.0",
    "@testing-library/jest-dom": "^5.11.9",
    "@testing-library/react": "^12.0.0",
    "@testing-library/user-event": "^13.0.6",
    "@vgs/collect-js": "^0.4.0",
    "bootstrap": "^5.0.2",
    "currency-format": "^1.0.13",
    "formik": "^2.2.6",
    "history": "^5.0.0",
    "i18next": "^20.1.0",
    "i18next-browser-languagedetector": "^6.0.1",
    "i18next-http-backend": "^1.0.21",
    "lodash": "^4.17.21",
    "markdown-react-js": "^1.0.2",
    "moment": "^2.29.1",
    "payment-icons": "^1.2.1",
    "react": "^16.1.1",
    "react-animate-height": "^2.0.23",
    "react-bootstrap": "^1.5.0",
    "react-country-flag": "^2.3.0",
    "react-dates": "^21.8.0",
    "react-dom": "^16.1.1",
    "react-i18next": "^11.8.5",
    "react-image-gallery": "^1.0.8",
    "react-modal": "^3.12.1",
    "react-phone-input-2": "^2.13.9",
    "react-redux": "^7.2.2",
    "react-router-dom": "^6.0.0-beta.0",
    "react-scripts": "^4.0.3",
    "react-select": "^4.1.0",
    "react-select-country-list": "^2.2.3",
    "react-social-login": "^3.4.10",
    "react-social-login-buttons": "^3.1.2",
    "react-with-direction": "^1.3.1",
    "styled-components": "^5.2.1",
    "yup": "^0.32.9"
  }
}

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:5
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

6reactions
kyletsangcommented, Sep 6, 2021

Will be fixed in next release

1reaction
val1984commented, Sep 6, 2021

Same issue with Bootstrap 4, definitely not a Bootstrap issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

React-Bootstrap Tooltip requires overlay error - Stack Overflow
I am just using Tooltip , and not an OverlayTrigger , but I am getting the error: webpack-internal:///133:33 Warning: Failed prop type: The ......
Read more >
CM Tooltip (CMTG) - Troubleshooting - JS Errors
Open the Console tab. Inspect the broken tooltip by right-clicking on the element and selecting “inspect element”. Here you will see what JS ......
Read more >
Tooltips - Bootstrap
Documentation and examples for adding custom Bootstrap tooltips with CSS and JavaScript using CSS3 for animations and data-attributes for local title storage.
Read more >
Tooltip Is Not A Function - Question - JoomShaper
After upgrade to helix 2.0.6 I got console errors on com_content pages: VM28646:2 Uncaught TypeError: $(...).find(...).tooltip is not a function at ...
Read more >
Solved: Custom tooltip - Uncaught TypeError: Cannot read p...
Based on the typings, I think your approach is correct and there is an issue in the utilities somewhere (based on what looks...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found