@canonical/react-components 0.51.1 → 0.51.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -191,12 +191,12 @@ const Tooltip = _ref => {
|
|
|
191
191
|
};
|
|
192
192
|
}, [handleKeyPress]);
|
|
193
193
|
const handleBlur = e => {
|
|
194
|
-
var _wrapperRef$current, _messageRef$current;
|
|
194
|
+
var _wrapperRef$current, _messageRef$current, _wrapperRef$current2;
|
|
195
195
|
// do not close if the focus is within the tooltip wrapper
|
|
196
196
|
if (wrapperRef !== null && wrapperRef !== void 0 && (_wrapperRef$current = wrapperRef.current) !== null && _wrapperRef$current !== void 0 && _wrapperRef$current.contains(document.activeElement)) {
|
|
197
197
|
return;
|
|
198
198
|
}
|
|
199
|
-
if (e.relatedTarget ? !((_messageRef$current = messageRef.current) !== null && _messageRef$current !== void 0 && _messageRef$current.contains(e.relatedTarget)) : e.target !== messageRef.current) {
|
|
199
|
+
if (e.relatedTarget ? !((_messageRef$current = messageRef.current) !== null && _messageRef$current !== void 0 && _messageRef$current.contains(e.relatedTarget)) && !((_wrapperRef$current2 = wrapperRef.current) !== null && _wrapperRef$current2 !== void 0 && _wrapperRef$current2.contains(e.relatedTarget)) : e.target !== messageRef.current) {
|
|
200
200
|
cancelableClosePortal();
|
|
201
201
|
}
|
|
202
202
|
};
|