solid-ui 3.0.4-9846782 → 3.0.4-aea68a1

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.
@@ -18385,6 +18385,8 @@ function basicField(dom, container, already, subject, form, doc, callbackFunctio
18385
18385
  field.style = inputStyle;
18386
18386
  rhs.appendChild(field);
18387
18387
  field.setAttribute('type', params.type ? params.type : 'text');
18388
+ var fieldType = (field.getAttribute('type') || '').toLowerCase();
18389
+ var deferWhileFocused = fieldType === 'date' || fieldType === 'datetime-local';
18388
18390
  var size = kb.anyJS(form, _ns__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A.ui('size')) || _styleConstants__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .A.textInputSize || 20;
18389
18391
  field.setAttribute('size', size);
18390
18392
  var maxLength = kb.any(form, _ns__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A.ui('maxLength'));
@@ -18423,9 +18425,13 @@ function basicField(dom, container, already, subject, form, doc, callbackFunctio
18423
18425
  }
18424
18426
  }, true);
18425
18427
  field.addEventListener('change', function (_e) {
18428
+ if (deferWhileFocused && dom.activeElement === field) return;
18426
18429
  // i.e. lose focus with changed data
18427
18430
  if (params.pattern && !field.value.match(params.pattern)) return;
18428
- field.disabled = true; // See if this stops getting two dates from fumbling e.g the chrome datepicker.
18431
+ var disabledForSave = !deferWhileFocused;
18432
+ if (disabledForSave) {
18433
+ field.disabled = true; // See if this stops getting two dates from fumbling e.g the chrome datepicker.
18434
+ }
18429
18435
  field.setAttribute('style', inputStyle + 'color: gray;'); // pending
18430
18436
  var ds = kb.statementsMatching(subject, property); // remove any multiple values
18431
18437
  var result;
@@ -18493,7 +18499,9 @@ function basicField(dom, container, already, subject, form, doc, callbackFunctio
18493
18499
  updateMany(ds, is, function (uri, ok, body) {
18494
18500
  // kb.updater.update(ds, is, function (uri, ok, body) {
18495
18501
  if (ok) {
18496
- field.disabled = false;
18502
+ if (disabledForSave) {
18503
+ field.disabled = false;
18504
+ }
18497
18505
  field.setAttribute('style', inputStyle);
18498
18506
  } else {
18499
18507
  box.appendChild((0,_error__WEBPACK_IMPORTED_MODULE_6__/* .errorMessageBlock */ .F)(dom, body));