[Custom Input Masks] MaskPercentage - Tab isn´t working when the value is 100%
Question
Forge component by Sara Gonçalves

Hi,

I detected that the component MaskPercentage is removing the tab key event when the value of the filled is equal to 100%. This is only happening when the value is exactly 100%.


There is some workaround?

Solution

Hello Marco,

The component was updated with version 5.0.0 of the plugin and the suggested solution was implemented.

Please update your component and try again.


Regards

An update to this issue:

I detected the root cause of it and as solution changed the script present on webblock MaskPercentage

 to don't prevent default behavior when the value is equal to 100 and the key pressed was the TAB ( code 9):

  $('#"+EncodeJavaScript(InputId)+"').on('keydown keyup', function(e){

        if ($(this).val() == 100 && e.which != 9) {
           e.preventDefault();
            }
        else if ($(this).val() > 100) {
                e.preventDefault();
                $(this).val(100);
             }

Best regards,


Marco Rodrigues

Solution

Hello Marco,

The component was updated with version 5.0.0 of the plugin and the suggested solution was implemented.

Please update your component and try again.


Regards

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.