Notifications

157 views

Description

OnChange event on the Client Script removes the space on the "newValue" parameter 

Steps to Reproduce

1- Login to Madrid Instance
2- Create Onchange client script with the below alert script
alert ("********** getValue =" +g_form.getValue('description') +"newValue ="+newValue);
3- Open any record on the incident, changed the text on the desciption field, add space before the text
4- The alert from the step2 shows that space on the "newValue" is removed

Note: On the London instance, the space on the "newValue" is not removed

Workaround

This problem has been fixed in New York release.

 

For Pre-New York release, you can consider using below workaround,

Create a global UI script with below details,

API Name: multimodified

UI Type: Desktop

Global: true

Active: true

Script:

function multiModified(me, type, currentValue) {
if ($(me.id).getAttribute("isquestionhtml") == "true") {
$(me.id).onchange();
return;
}
multiKeyDown(me);
var form = findParentByTag(me, "form");
var changeFlag = true;
if (me.id && form) {
var elementName = me.id;
var vOriginal = unescape(eval('g_' + me.id.replace(/\./g, '_')));
if (currentValue === undefined) {
currentValue = me.value;
if (!currentValue.trim()) {
me.value = "";
currentValue = "";
}
}
if (type == undefined)
type = 'htmlarea';
if (currentValue == vOriginal)
changeFlag = false;
me.changed = changeFlag;
onChangeLabelProcess(elementName, currentValue);
if (type == 'tinymce' || (type.baseURL && type.baseURL.indexOf('tinymce') > -1)){
clientScriptOnChange(elementName, me, 'unknown', currentValue);
}else{
if ((typeof me.isFocused) == "boolean") // element must have onblur/onfocus handlers to set this
if (me.isFocused == false) // if no longer in focus, fire on change scripts
clientScriptOnChange(elementName, me, 'unknown', currentValue);
}
}
fieldChanged(elementName, changeFlag);
var onChangeData = {id : me.id, value : me.value, modified: me.changed};
$(me.up('form')).fire('glideform:onchange', onChangeData);
}

 

Note: After upgrading to New York release, please make sure to remove the above workaround UI script.

 


Related Problem: PRB1348943

Seen In

SR - IRM - Audit Management - New York 2019 Q3
SR - IRM - GRC Profiles - Madrid 2019 Q2
SR - IRM - GRC Workbench - New York 2019 Q3
SR - IRM - PA Premium Integration - New York 2019 Q3
SR - IRM - Policy and Compliance - Madrid 2019 Q2
SR - IRM - Risk Management - New York 2019 Q3
SR - IRM - Vendor Risk Management - Madrid 2019 Q1
SR - Security - Integration Framework - Madrid 2019 Q2
SR - Security - Support Common - Madrid 2019 Q2
SR - Security - Support Orchestration - Madrid 2019 Q2
SR - SIR - Security Incident Response - Madrid 2019 Q2
SR - SIR - Store SecOps Setup Assistant - Madrid 2019 Q2
SR - SIR - Store Threat Core - Madrid 2019 Q2
SR - SIR - Store Trusted Security Circles Client - New York 2019 Q3
SR - VR - Qualys - New York 2019 Q3
SR - VR - Vulnerability Response - New York 2019 Q3
SR - VR - Vulnerability Response PA Content - Madrid 2019 Q2

Fixed In

New York

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2019-09-11 00:25:34
Published:2019-09-11