@linzjs/step-ag-grid 7.11.2 → 7.11.4

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.
@@ -198,19 +198,21 @@ function commonProps(isDisabled, isHovering) {
198
198
  }
199
199
  var indexOfNode = function (nodeList, node) { return findIndex(nodeList, node); };
200
200
  var focusFirstInput = function (container) {
201
- if (!(container instanceof Element))
201
+ // We can't use instanceof Element in portals, so I use querySelectorAll as a proxy here
202
+ if (!container || !("querySelectorAll" in container))
202
203
  return false;
203
204
  var inputs = container.querySelectorAll("input[type='text'],textarea");
204
205
  var input = inputs[0];
205
- if (input instanceof HTMLElement) {
206
- input.focus();
207
- // Text areas should start at end
208
- if (input instanceof HTMLTextAreaElement) {
209
- input.selectionStart = input.value.length;
210
- }
211
- return true;
206
+ // Using focus as proxy for HTMLElement
207
+ if (!input || !("focus" in input))
208
+ return false;
209
+ input.focus();
210
+ // Text areas should start at end
211
+ // this is a proxy for instanceof HTMLTextAreaElement
212
+ if (input.type === "textarea") {
213
+ input.selectionStart = input.value.length;
212
214
  }
213
- return false;
215
+ return true;
214
216
  };
215
217
 
216
218
  /******************************************************************************
@@ -3771,7 +3773,7 @@ var MenuRadioItem = function (props) {
3771
3773
  }, [options, setOptions]);
3772
3774
  return (jsx(MenuItem, __assign({ onClick: function (e) {
3773
3775
  // Global react-menu MenuItem handler handles tabs
3774
- if (e.key !== "Tab") {
3776
+ if (e.key !== "Tab" && e.key !== "Enter") {
3775
3777
  e.keepOpen = true;
3776
3778
  toggleValue(item);
3777
3779
  }