@colijnit/corecomponents_v12 256.1.12 → 256.1.14

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.
@@ -8270,18 +8270,22 @@
8270
8270
  return true;
8271
8271
  };
8272
8272
  InputSearchComponent.prototype.handleKeyDown = function (event) {
8273
- switch (event.code) {
8274
- case 'Enter':
8275
- case 'NumpadEnter':
8276
- event.preventDefault();
8277
- this.search.next(this.model);
8278
- return;
8273
+ var enterKeys = ['Enter', 'NumpadEnter', 'Go'];
8274
+ if (enterKeys.includes(event.key)) {
8275
+ event.preventDefault();
8276
+ if (this.isMobileDevice()) {
8277
+ event.target.blur();
8278
+ }
8279
+ this.search.next(this.model);
8279
8280
  }
8280
8281
  };
8281
8282
  InputSearchComponent.prototype.handleModelChange = function (model) {
8282
8283
  this.model = model;
8283
8284
  this.modelChange.next(this.model);
8284
8285
  };
8286
+ InputSearchComponent.prototype.isMobileDevice = function () {
8287
+ return /Android|iPhone|iPad|iPod/i.test(navigator.userAgent);
8288
+ };
8285
8289
  return InputSearchComponent;
8286
8290
  }(BaseInputComponent));
8287
8291
  InputSearchComponent.decorators = [