Fixed save button enable issue when focusing in and out of numeric input field. Fixes #5137

This commit is contained in:
Satish V
2020-07-17 12:08:23 +05:30
committed by Akshay Joshi
parent bd15d2d0f7
commit 64cdd509b0
2 changed files with 6 additions and 1 deletions

View File

@@ -367,8 +367,12 @@ define([
return;
}
attrs[k] = v;
const attrsDefined = self.origSessAttrs[k] && v;
/* If the orig value was null and new one is empty string, then its a "no change" */
if (_.isEqual(self.origSessAttrs[k], v) || (self.origSessAttrs[k] === null && v === '')) {
/* If the orig value and new value are of different datatype but of same value(numeric) "no change" */
if (_.isEqual(self.origSessAttrs[k], v)
|| (self.origSessAttrs[k] === null && v === '')
|| (attrsDefined ? _.isEqual(self.origSessAttrs[k].toString(), v.toString()) : false)) {
delete self.sessAttrs[k];
} else {
self.sessAttrs[k] = v;