diff --git a/packages/react/src/components/Tooltip/Tooltip-test.js b/packages/react/src/components/Tooltip/Tooltip-test.js
index 99a861ae0d0b..fd619ba43a1c 100644
--- a/packages/react/src/components/Tooltip/Tooltip-test.js
+++ b/packages/react/src/components/Tooltip/Tooltip-test.js
@@ -5,10 +5,12 @@
* LICENSE file in the root directory of this source tree.
*/
-import React, { Component } from 'react';
+import React, { Component, useState } from 'react';
import debounce from 'lodash.debounce'; // eslint-disable-line no-unused-vars
import FloatingMenu from '../../internal/FloatingMenu';
import Tooltip from '../Tooltip';
+import Link from '../Link';
+import Button from '../Button';
import { mount } from 'enzyme';
import { screen, render } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
@@ -233,5 +235,102 @@ describe('Tooltip', () => {
expect(screen.queryByText('tooltip body')).not.toBeInTheDocument();
});
+
+ it('should not call onChange on focus of an interactive element in body when controlled', () => {
+ const onChange = jest.fn();
+ function ControlledWithStateOnChange() {
+ const [tipOpen, setTipOpen] = useState(false);
+ const handleChange = (ev, { open }) => {
+ onChange(ev, { open });
+ setTipOpen(open);
+ };
+
+ return (
+
+
+ This is some tooltip text. This box shows the maximum amount of
+ text that should be displayed inside. If more room is needed, use
+ a modal instead.
+