@bpmn-io/properties-panel 3.8.0 → 3.9.0

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.
package/dist/index.esm.js CHANGED
@@ -1171,6 +1171,7 @@ function PopupComponent(props, globalRef) {
1171
1171
  const focusTrapRef = useRef(null);
1172
1172
  const localRef = useRef(null);
1173
1173
  const popupRef = globalRef || localRef;
1174
+ const containerNode = useMemo(() => getContainerNode(container), [container]);
1174
1175
  const handleKeydown = event => {
1175
1176
  // do not allow keyboard events to bubble
1176
1177
  event.stopPropagation();
@@ -1230,7 +1231,7 @@ function PopupComponent(props, globalRef) {
1230
1231
  class: classnames('bio-properties-panel-popup', className),
1231
1232
  style: style,
1232
1233
  children: props.children
1233
- }), container || document.body);
1234
+ }), containerNode || document.body);
1234
1235
  }
1235
1236
  const Popup = forwardRef(PopupComponent);
1236
1237
  Popup.Title = Title;
@@ -1350,6 +1351,12 @@ function cancel(event) {
1350
1351
  event.preventDefault();
1351
1352
  event.stopPropagation();
1352
1353
  }
1354
+ function getContainerNode(node) {
1355
+ if (typeof node === 'string') {
1356
+ return query(node);
1357
+ }
1358
+ return node;
1359
+ }
1353
1360
 
1354
1361
  const FEEL_POPUP_WIDTH = 700;
1355
1362
  const FEEL_POPUP_HEIGHT = 250;