Question
Folksam
SE
Last activity: 1 Nov 2019 11:12 EDT
Disable scrolling on pxCurrency control
Hi!
We have an application where considerable sums of money are paid out to customers. Our users have been complaining about the ability to scroll in currency fields which sometimes results in customers being paid out an incorrect amount because a rogue scroll was picked up by the out-of-the-box pxCurrency control.
Is there an existing hotfix to disable scrolling in currency fields, or is there a way to disable this feature in the control?
I'm aware that it's a standard for Number fields in modern browsers, but in our case it's causing more trouble than benefit.
Cheers!
Daniel
***Edited by Moderator Marissa to update platform capability tags****
***Moderator Edit-Vidyaranjan: Updated SR details***
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Pegasystems Inc.
GB
Hello
I have logged FDBK-29088 on your behalf. As always we are unable to determine if and when our Engineering team will consider this for a future product version.
Pegasystems Inc.
US
Can you please add the configuration & UI screen shots.
Folksam
SE
I added two screenshots of the control configuration in Designer Studio, not really sure what you need to see, do you need screenshots of the application too
?
Pegasystems Inc.
IN
Hi Daniel,
Please share the configuration screen shots of the currency field you configured in your section.
Also please share the issue screen shots showing the scroll bar, to get clarity on the issue?
Thanks!
Folksam
SE
Hi gudam, please find the screenshots attached.
I'm not entirely sure you've understood the issue. There is no scrollbar on the field. The amount in the field changes if the user scrolls by mistake, which is an issue in fields that contain payment amounts as it leaves room for error.
Have a look at this below to understand what I mean
https://stackoverflow.com/questions/9712295/disable-scrolling-on-input-type-number
PEG
US
I know that the following JS will capture the "wheel" event (formerly "mousewheel" in older brosers) and toss it in the bit-bucket:
this.canvas.addEventListener('wheel',function(event){ mouseController.wheel(event); return false; }, false);
I'm not sure how you could add this to the currency field. You might test first by putting this in userworkform to disable the wheel everywhere. Once you see you've gotten the correct syntax, you might see if you can restrict it just to the currency fields.
Folksam
SE
Thanks, I will try that out and update this thread with the results.
Folksam
SE
Hi, the above JS did not work for us, but using the jQuery below worked for disabling scrolling on all input fields of type "Number".
$(document).on("wheel", "input[type=number]", function (e) {
$(this).blur();
});
This solution is OK for us at the moment, but we'd like to have the option to disable scrolling on a control level (eg. pxCurrency) rather than a type level (eg. Number).
Any solution/hotfix that can give us this option is very welcome.
Thanks for the support so far.
Updated: 8 Nov 2018 8:19 EST
PEG
US
Excellent news! You may be pleased to know that I've passed your solution on to the PegaSupport team as we have a similar field which, because of its position in the form, is extremely susceptible to receiving the scroll event, with bad results.
Regarding the pxCurrency control, I suggest you raise an SR requesting the same, mentioning the solution you've implemented. I'm guessing that would turn either into an actual hotfix (unlikely), or an enhancement request which might get implemented in some future release.
Folksam
SE
Hi, I've made a support request with ID SR-C74179.
All the best,
Daniel
Pegasystems Inc.
IN
Hi Daniel,
Thank you for sharing the SR#, I have tagged it along with the issue description for support engineers reference.
Regards,
Tata Consultancy Services
US
Hi Daniel,Could you please give detailed steps on where you added the above JQuery?
Folksam
SE
Hi Jaya,
Disclaimer: The solution I provide is based on my own experience and may or may not work on your system. Try at your own risk. Also note that this was tested on Pega 7.3.1.
Solution: There is a HTML Fragment in Pega called UserWorkForm which seems to be accessible by the browser at all times. Edit UserWorkForm and add below (with script tags included)
<script>
$(document).on("wheel", "input[type=number]", function (e) {
$(this).blur();
});
</script>
Save and test your change. This script should now be loaded automatically every time you run your Pega application.
Be aware that this is a workaround and in no way an official solution. I recommend getting an official solution from Pega if this regards a critical production system.
Regards,
Daniel
Pegasystems Inc.
GB
Unfortunately this behaviour comes from the browser.
If you mouse-wheel scroll the cursor focus in any numeric field in a form (not just in Pega), the browser will increment/decrement the value. It is not specific to pxCurrency.
The correct way to log a product enhancement is to discuss the issue on the PSC, as you are doing here. It will be up to the Product Engineers to comment whether this is a feasible Enhancement Request.
Accepted Solution
Pegasystems Inc.
GB
Hello
I have logged FDBK-29088 on your behalf. As always we are unable to determine if and when our Engineering team will consider this for a future product version.
Pegasystems Inc.
US
You can follow up with your Account Executive on this FDBK ID that was added to your original thread for more information/next steps.
Folksam
SE
Thank you, where can I find FDBK-29088?
Pegasystems Inc.
GB
Daniel, a FDBK item is an enhancement request, not a hotfix.
You can mention the ID of the enhancement to your account executive if you need to bring up this subject in the future.
Folksam
SE
Yes, I understand this. I was asking where I can see the enhancement request progress. I'm able to view support requests in my support portal, but no enhancement requests.
Pegasystems Inc.
GB
These are not tracked in any external applications. That is why any interest you have in the quoted request must be discussed with an AE.
Folksam
SE
Ok.