diff --git a/CHANGELOG.md b/CHANGELOG.md
index 74ef3bb098b..255ec649d58 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,11 @@
## [`master`](https://github.com/elastic/eui/tree/master)
-No public interface changes since `37.3.1`.
+- Updated `EuiToolTip` to remain showing tooltip while child element is in focus ([#5066](https://github.com/elastic/eui/pull/5066))
+- Removed `children` from TypeScript definition in `EuiIconTip` ([#5066](https://github.com/elastic/eui/pull/5066))
+
+**Bug fixes**
+
+- Fixed location of default value of `EuiToolTip`'s `display` prop ([#5066](https://github.com/elastic/eui/pull/5066))
## [`37.3.1`](https://github.com/elastic/eui/tree/v37.3.1)
diff --git a/src-docs/src/views/tool_tip/playground.js b/src-docs/src/views/tool_tip/playground.js
index 4d8d12f3386..17a6fba38d9 100644
--- a/src-docs/src/views/tool_tip/playground.js
+++ b/src-docs/src/views/tool_tip/playground.js
@@ -1,12 +1,13 @@
import { PropTypes } from 'react-view';
-import { EuiToolTip } from '../../../../src/components/';
+import { EuiToolTip, EuiIconTip } from '../../../../src/components';
import {
propUtilityForPlayground,
dummyFunction,
simulateFunction,
+ iconValidator,
} from '../../services/playground';
-export default () => {
+export const toolTipConfig = () => {
const docgenInfo = Array.isArray(EuiToolTip.__docgenInfo)
? EuiToolTip.__docgenInfo[0]
: EuiToolTip.__docgenInfo;
@@ -51,3 +52,44 @@ export default () => {
},
};
};
+
+export const iconTipConfig = () => {
+ const docgenInfo = Array.isArray(EuiIconTip.__docgenInfo)
+ ? EuiIconTip.__docgenInfo[0]
+ : EuiIconTip.__docgenInfo;
+ const propsToUse = propUtilityForPlayground(docgenInfo.props);
+
+ propsToUse.type = iconValidator(propsToUse.type);
+
+ propsToUse.title = {
+ ...propsToUse.title,
+ type: PropTypes.String,
+ value: 'Title',
+ };
+
+ propsToUse.content = {
+ ...propsToUse.content,
+ type: PropTypes.String,
+ value: 'Content',
+ };
+
+ propsToUse.onMouseOut = simulateFunction(propsToUse.onMouseOut);
+
+ return {
+ config: {
+ componentName: 'EuiIconTip',
+ props: propsToUse,
+ scope: {
+ EuiIconTip,
+ },
+ imports: {
+ '@elastic/eui': {
+ named: ['EuiIconTip'],
+ },
+ },
+ customProps: {
+ onMouseOut: dummyFunction,
+ },
+ },
+ };
+};
diff --git a/src-docs/src/views/tool_tip/tool_tip.js b/src-docs/src/views/tool_tip/tool_tip.js
index cc8e4017890..87d8655027e 100644
--- a/src-docs/src/views/tool_tip/tool_tip.js
+++ b/src-docs/src/views/tool_tip/tool_tip.js
@@ -5,9 +5,7 @@ import {
EuiToolTip,
EuiLink,
EuiText,
- EuiFieldText,
- EuiSpacer,
- EuiButton,
+ EuiCode,
} from '../../../../src/components';
export default () => (
@@ -18,6 +16,7 @@ export default () => (
@@ -37,14 +36,16 @@ export default () => (
- This tooltip has a long delay because it might be in a repeatable
- component{' '}
+ This tooltip has a long
@@ -54,41 +55,5 @@ export default () => (
- -
-
- EuiToolTip wraps its children in a span element, so if you pass in a - block-level child (e.g. a div) the resulting DOM will be in violation of - the HTML5 spec. + Generally, tooltips should provide short, non-essential + , contextual information, usually naming or describing with more detail. + If you need interactive content or anything other than text, we + recommend using{' '} + + EuiPopover + {' '} + instead.
- + +
Wrap EuiToolTip around any item that you need a
- tooltip for. The
- Internally, EuiToolTip applies{' '}
-
+ EuiToolTip wraps its children in a{' '}
+
+ It also applies
@@ -157,10 +164,16 @@ export const ToolTipExample = {