fit-ui 2.17.0 → 2.17.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 +29 -6
- package/dist/Fit.UI.min.js +1 -1
- package/package.json +1 -1
package/dist/Fit.UI.js
CHANGED
|
@@ -682,7 +682,7 @@ Fit._internal =
|
|
|
682
682
|
{
|
|
683
683
|
Core:
|
|
684
684
|
{
|
|
685
|
-
VersionInfo: { Major: 2, Minor: 17, Patch:
|
|
685
|
+
VersionInfo: { Major: 2, Minor: 17, 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
|
|
|
@@ -23462,9 +23462,10 @@ Fit.Controls.Input = function(ctlId)
|
|
|
23462
23462
|
Fit.Core.Extend(this, Fit.Controls.ControlBase).Apply(ctlId);
|
|
23463
23463
|
|
|
23464
23464
|
var me = this;
|
|
23465
|
-
var orgVal = "";
|
|
23466
|
-
var preVal = "";
|
|
23465
|
+
var orgVal = ""; // Holds initial value used to determine IsDirty state
|
|
23466
|
+
var preVal = ""; // Holds latest change made by user - used to determine whether OnChange needs to be fired
|
|
23467
23467
|
var input = null;
|
|
23468
|
+
var changeObserverId = -1; // Holds interval ID to observer function for controls (e.g. color picker) not continuously firing OnChange when value is changed
|
|
23468
23469
|
var cmdResize = null;
|
|
23469
23470
|
var designEditor = null;
|
|
23470
23471
|
var designEditorDom = null; // DOM elements within CKEditor which we rely on - some <div> elements become <span> elements in older browsers
|
|
@@ -23603,11 +23604,25 @@ Fit.Controls.Input = function(ctlId)
|
|
|
23603
23604
|
{
|
|
23604
23605
|
restoreHiddenToolbarInDesignEditor(); // Make toolbar appear if currently hidden
|
|
23605
23606
|
//updateDesignEditorPlaceholder(true); // Clear placeholder text
|
|
23607
|
+
|
|
23608
|
+
if (me.Type() === "Color") // Color picker does not continuously fire OnChange when changing color - fix that using an observer function
|
|
23609
|
+
{
|
|
23610
|
+
changeObserverId = setInterval(function()
|
|
23611
|
+
{
|
|
23612
|
+
input.onkeyup();
|
|
23613
|
+
}, 100);
|
|
23614
|
+
}
|
|
23606
23615
|
});
|
|
23607
23616
|
me.OnBlur(function(sender)
|
|
23608
23617
|
{
|
|
23609
23618
|
restoreDesignEditorButtons(); // Restore (enable) editor's toolbar buttons in case they were temporarily disabled
|
|
23610
23619
|
updateDesignEditorPlaceholder(); // Show placeholder text if control value is empty
|
|
23620
|
+
|
|
23621
|
+
if (changeObserverId !== -1)
|
|
23622
|
+
{
|
|
23623
|
+
clearInterval(changeObserverId);
|
|
23624
|
+
changeObserverId = -1;
|
|
23625
|
+
}
|
|
23611
23626
|
});
|
|
23612
23627
|
|
|
23613
23628
|
Fit.Events.AddHandler(me.GetDomElement(), "paste", true, function(e)
|
|
@@ -23870,6 +23885,8 @@ Fit.Controls.Input = function(ctlId)
|
|
|
23870
23885
|
|
|
23871
23886
|
if (Fit.Validation.IsSet(val) === true)
|
|
23872
23887
|
{
|
|
23888
|
+
val = me.Type() === "Color" ? val.toUpperCase() : val;
|
|
23889
|
+
|
|
23873
23890
|
var fireOnChange = (me.Value() !== val);
|
|
23874
23891
|
|
|
23875
23892
|
orgVal = (preserveDirtyState !== true ? val : orgVal);
|
|
@@ -23993,7 +24010,7 @@ Fit.Controls.Input = function(ctlId)
|
|
|
23993
24010
|
return curVal;
|
|
23994
24011
|
}
|
|
23995
24012
|
|
|
23996
|
-
return input.value;
|
|
24013
|
+
return me.Type() === "Color" ? input.value.toUpperCase() : input.value;
|
|
23997
24014
|
}
|
|
23998
24015
|
|
|
23999
24016
|
// See documentation on ControlBase
|
|
@@ -24122,6 +24139,11 @@ Fit.Controls.Input = function(ctlId)
|
|
|
24122
24139
|
destroyDesignEditorInstance(); // Destroys editor and stops related mutation observers, timers, etc.
|
|
24123
24140
|
}
|
|
24124
24141
|
|
|
24142
|
+
if (changeObserverId !== -1)
|
|
24143
|
+
{
|
|
24144
|
+
clearInterval(changeObserverId);
|
|
24145
|
+
}
|
|
24146
|
+
|
|
24125
24147
|
Fit.Internationalization.RemoveOnLocaleChanged(localize);
|
|
24126
24148
|
|
|
24127
24149
|
/*if (designEditorUpdateSizeDebouncer !== -1)
|
|
@@ -24167,7 +24189,7 @@ Fit.Controls.Input = function(ctlId)
|
|
|
24167
24189
|
});
|
|
24168
24190
|
}
|
|
24169
24191
|
|
|
24170
|
-
me = orgVal = preVal = input = cmdResize = designEditor = designEditorDom = designEditorDirty = designEditorDirtyPending = designEditorConfig = designEditorReloadConfig = designEditorRestoreButtonState = designEditorSuppressPaste = designEditorSuppressOnResize = designEditorMustReloadWhenReady = designEditorMustDisposeWhenReady = designEditorUpdateSizeDebouncer = designEditorHeightMonitorId = designEditorActiveToolbarPanel = designEditorDetached = designEditorClearPlaceholder = designEditorCleanEditableDom = designEditorGlobalKeyDownEventId = designEditorGlobalKeyUpEventId /*= htmlWrappedInParagraph*/ = wasAutoChangedToMultiLineMode = minimizeHeight = maximizeHeight = minMaxUnit = maximizeHeightConfigured = resizable = nativeResizableAvailable = mutationObserverId = rootedEventId = createWhenReadyIntervalId = isIe8 = debounceOnChangeTimeout = debouncedOnChange = imageBlobUrls = locale = null;
|
|
24192
|
+
me = orgVal = preVal = input = changeObserverId = cmdResize = designEditor = designEditorDom = designEditorDirty = designEditorDirtyPending = designEditorConfig = designEditorReloadConfig = designEditorRestoreButtonState = designEditorSuppressPaste = designEditorSuppressOnResize = designEditorMustReloadWhenReady = designEditorMustDisposeWhenReady = designEditorUpdateSizeDebouncer = designEditorHeightMonitorId = designEditorActiveToolbarPanel = designEditorDetached = designEditorClearPlaceholder = designEditorCleanEditableDom = designEditorGlobalKeyDownEventId = designEditorGlobalKeyUpEventId /*= htmlWrappedInParagraph*/ = wasAutoChangedToMultiLineMode = minimizeHeight = maximizeHeight = minMaxUnit = maximizeHeightConfigured = resizable = nativeResizableAvailable = mutationObserverId = rootedEventId = createWhenReadyIntervalId = isIe8 = debounceOnChangeTimeout = debouncedOnChange = imageBlobUrls = locale = null;
|
|
24171
24193
|
|
|
24172
24194
|
base();
|
|
24173
24195
|
});
|
|
@@ -27349,8 +27371,9 @@ Fit.Controls.Input = function(ctlId)
|
|
|
27349
27371
|
function fireOnChange()
|
|
27350
27372
|
{
|
|
27351
27373
|
var newVal = me.Value();
|
|
27374
|
+
var compareValue = me.Type() === "Color" ? preVal.toUpperCase() : preVal; // Value() returns uppercase value for color picker - preVal might be in lower case if assigned before input type was changed
|
|
27352
27375
|
|
|
27353
|
-
if (newVal !==
|
|
27376
|
+
if (newVal !== compareValue)
|
|
27354
27377
|
{
|
|
27355
27378
|
// DISABLED: No longer necessary with the introduction of designEditorDirty which ensures
|
|
27356
27379
|
// that we get the initial value set from Value(), unless changed by the user using the editor.
|