And this is why some people hate Javascript

Working on our VLF application, I ran into a problem for our Microsoft Edge users: If the command handler window was expanded (the draggable bar pulled upwards) beyond a certain point, only the filter window contracted. Not the instance list and thereby effectively nor the command handler window.

The problem comes from resizing of the table cells, the function VF_SY001_PRIVATE_SizeInstanceList_Height in VF_XXNNN.js.

So I chose to overwrite the function in an additional javascript file, if the user is in Edge:

window.setTimeout(function() {
if (window.navigator.userAgent.indexOf("Edge") > -1) {
var func = VF_SY001_PRIVATE_SizeInstanceList_Height;
VF_SY001_PRIVATE_SizeInstanceList_Height = function(sHeight) {
func(sHeight);
let nHeight = parseInt(sHeight);
nHeight = nHeight + 24;
nHeight = "" + nHeight + "px";
document.getElementById("VF_UM011_Container").style.height = nHeight;
};
}
}, 1000);

I set the func variable to the original function, overwrite the function to call the original plus some extra code. Now I just need it tested by others.

Advertisements