terra-popup
Advanced tools
Comparing version
@@ -5,2 +5,7 @@ # Changelog | ||
## 6.81.0 - (May 1, 2024) | ||
* Changed | ||
* Added event handlers to call `stopPropagation()` on key and focus events on PopupContent in other components. | ||
## 6.80.0 - (April 4, 2024) | ||
@@ -7,0 +12,0 @@ |
@@ -15,2 +15,3 @@ "use strict"; | ||
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits")); | ||
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); | ||
var _react = _interopRequireDefault(require("react")); | ||
@@ -117,3 +118,11 @@ var _reactIntl = require("react-intl"); | ||
_this = _callSuper(this, PopupContent, [props]); | ||
/** | ||
* This method stopps key and focus events from bubbling for Popup support in terra-compact-interactive-list. | ||
* The key and focus events still work inside the popup as expected. | ||
*/ | ||
(0, _defineProperty2.default)(_this, "handlePropagation", function (event) { | ||
event.stopPropagation(); | ||
}); | ||
_this.handleOnResize = _this.handleOnResize.bind(_this); | ||
_this.handlePropagation = _this.handlePropagation.bind(_this); | ||
return _this; | ||
@@ -192,3 +201,5 @@ } | ||
refCallback: refCallback, | ||
role: popupContentRole || null | ||
role: popupContentRole || null, | ||
onKeyDown: this.handlePropagation, | ||
onFocus: this.handlePropagation | ||
}), arrowContent, /*#__PURE__*/_react.default.createElement("div", (0, _extends2.default)({}, heightData, widthData, { | ||
@@ -195,0 +206,0 @@ className: innerClassNames, |
{ | ||
"name": "terra-popup", | ||
"version": "6.80.0", | ||
"version": "6.81.0", | ||
"description": "The Terra Popup is higher order component that launches terra-hookshot positioned content with the ability to display a dynamic arrow.", | ||
@@ -67,3 +67,3 @@ "author": "Cerner Corporation", | ||
}, | ||
"gitHead": "8ebcd02fcb899d6b62056bc130bb8c59721eff00" | ||
"gitHead": "ab53c8fa80e8d5fe920e06b790a55e0da7726531" | ||
} |
@@ -140,2 +140,3 @@ import React from 'react'; | ||
this.handleOnResize = this.handleOnResize.bind(this); | ||
this.handlePropagation = this.handlePropagation.bind(this); | ||
} | ||
@@ -172,2 +173,10 @@ | ||
/** | ||
* This method stopps key and focus events from bubbling for Popup support in terra-compact-interactive-list. | ||
* The key and focus events still work inside the popup as expected. | ||
*/ | ||
handlePropagation = (event) => { | ||
event.stopPropagation(); | ||
}; | ||
handleOnResize(event) { | ||
@@ -242,2 +251,4 @@ if (this.props.onResize) { | ||
role={popupContentRole || null} | ||
onKeyDown={this.handlePropagation} | ||
onFocus={this.handlePropagation} | ||
> | ||
@@ -244,0 +255,0 @@ {arrowContent} |
135966
0.85%2128
1%