fit-ui 2.16.1 → 2.16.2

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/Fit.UI.js CHANGED
@@ -682,7 +682,7 @@ Fit._internal =
682
682
  {
683
683
  Core:
684
684
  {
685
- VersionInfo: { Major: 2, Minor: 16, Patch: 1 } // Do NOT modify format - version numbers are programmatically changed when releasing new versions - MUST be on a separate line!
685
+ VersionInfo: { Major: 2, Minor: 16, Patch: 2 } // Do NOT modify format - version numbers are programmatically changed when releasing new versions - MUST be on a separate line!
686
686
  }
687
687
  };
688
688
 
@@ -14282,7 +14282,16 @@ Fit.Controls.DatePicker = function(ctlId)
14282
14282
  }
14283
14283
  }
14284
14284
 
14285
- return Fit.Array.Contains([input, inputTime, inputMobile, inputTimeMobile], Fit.Dom.GetFocused()) === true;
14285
+ var hasFocus = Fit.Array.Contains([input, inputTime, inputMobile, inputTimeMobile], Fit.Dom.GetFocused()) === true;
14286
+
14287
+ if (hasFocus === false && isMobile === false)
14288
+ {
14289
+ // Make sure Focused() returns true while interacting with calendar widget - https://github.com/Jemt/Fit.UI/issues/194
14290
+ var calendarWidget = document.getElementById("fitui-datepicker-div"); // Null if not loaded yet
14291
+ hasFocus = calendarWidget !== null && calendarWidget.style.display === "block" && calendarWidget._associatedFitUiControl === me.GetId();
14292
+ }
14293
+
14294
+ return hasFocus;
14286
14295
  }
14287
14296
 
14288
14297
  /// <function container="Fit.Controls.DatePicker" name="Value" access="public" returns="string">
@@ -14931,10 +14940,12 @@ Fit.Controls.DatePicker = function(ctlId)
14931
14940
 
14932
14941
  datepicker.datepicker("show"); // Fails if not visible (part of render tree)
14933
14942
 
14943
+ var calendarWidget = document.getElementById("fitui-datepicker-div");
14944
+ calendarWidget._associatedFitUiControl = me.GetId();
14945
+
14934
14946
  // Allow light dismissable panels/callouts to prevent close/dismiss
14935
14947
  // when interacting with calendar widget hosted outside of panels/callouts,
14936
14948
  // by detecting the presence of a data-disable-light-dismiss="true" attribute.
14937
- var calendarWidget = document.getElementById("fitui-datepicker-div");
14938
14949
  Fit.Dom.Data(calendarWidget, "disable-light-dismiss", "true");
14939
14950
 
14940
14951
  moveCalenderWidgetLocally();
@@ -15088,7 +15099,7 @@ Fit.Controls.DatePicker = function(ctlId)
15088
15099
  onSelect: function(dateText, dp) // Notice: jQuery UI DatePicker no longer fires input.OnChange when OnSelect is registered
15089
15100
  {
15090
15101
  startDate = null;
15091
- me.Focused(true);
15102
+ input.focus(); // Do not use Focused(true) as it will not re-focus input, since control is already considered focused
15092
15103
  input.onchange();
15093
15104
  },
15094
15105
  beforeShow: function(elm, dp)