[CustomMasks] Updating InputMask version

[CustomMasks] Updating InputMask version

  
Forge Component
(17)
Published on 23 Sep by Pedro Oliveira
17 votes
Published on 23 Sep by Pedro Oliveira
Hi there,
 
I have been working on a project which is using CustomMasks.
However, I there are some problematic behavior (Scenario #2) and trying to solve it by replacing InputMask with newer version.
 
<Phenomenon>
Can be reproduced in the following Web page
https://labsdev.outsystems.net/CustomMasks/Examples.aspx
 
(Scenario #1)
1. Enter "121.111.111.111" to IP text box
   * A user only types numbers, and period(.) is automatically inserted.
 
2. Delete "2" using back space key, and try to type another number.
    -> The application works as expected.
 
(Scenario #2)
1. Enter "121.111.111.111" to IP text box
   * A user only types numbers, and period(.) is automatically inserted.
 
2. Copy the entered values and paste it.
 
3. Delete "2" using back space key, and try to type another number.
   -> Cannot enter any value
 
Problem happens when a value which includes "delimiter" like Scenario#2.
 
I have tested with InputMask itself but this phenomenon did not happen.
Demo site for InputMask (IP address)
http://robinherbots.github.io/jquery.inputmask/
 
Thus, decided to replace InputMask with newr version, but we encountered the following issue and would like to ask you for help.
 
Issue: There are some differences between the scripts in InputMask used by MaskPlugin(WebBlock)(refer to "3.1.27_osp.txt" file) and the one available at github (refer to "3.1.27_github.txt" file) 
 
If we replace InputMask with the newer version, the differences will be gone, and we would like to know if it will not cause any problems on the behavior of CustomMasks. And if there will be a problem, I woulkd like to know how to fix it.
 
The attached file (CustomMasks2.oml)) is the one having the issue described above.

Thanks,

Emi Yokota

Hello Emi,

I'm happy that you are using the CustomMasks component :)
About the problem that you described... That behaviour is new to me and really strange. But you're right, by replacing with a newer version the problem disappears. The bug must be related with the plugin, so the replacement by the new version seems a good solution to me.

I did some quick tests, and from the examples in that module there are two masks with problems:
1. The URL doesn't work properly since the new version seems to not support the mask definition 'url'. This is not really an issue since doing an URL mask using a regex is simple to do.

2. The maskDate block doesn't work, properly because the API has changed. If you open the console in browser (while testing the examples) you will see a javascript error. The function maskDate has the $.inputMask undefined.

In the meanwhile if you are not using the maskDate you can use the newer version, at least that will fix your problem.
I will do my best to try to upload a component with a newer version and together with other fixes that have being requested.

Thank you Emi and let me know if you have any other trouble using CustomMasks.

Sara Gonçalves
Hi Sara-san,

Thank you for your reply.

I am looking forward to see the new version of CustomMasks, and hace some quetions regarding the new version you are working on.

#1. Since I need to make modifications to our projects' schedule, I would like to ask you when the new version of CustomMasks will be uploaded (rough estimate will be fine)?

#2. Since a lot of WebScreens are using this module, I would like to know ahead if there will be some changes on the usage (e.g. the number of input parameter will change). In other words, when the new version is released, do we just need to publish the version and refresh eSpace references which are using CustomMasks or need to make some changes where the module is used?

Thanks,

Emi 
Hello Emi,

#1. By the end of the week I expect to upload a new version, but in the worst case (in case of some surprise cames up) next monday will be a more secure estimation.

#2. I will do my best to avoid changing the number of input parameters, and at first side I don't think that will be needed. What means that you will just need to refresh the eSpace references :)

Thank you!

Sara Gonçalves
Hi Sara-san,

Thank you for your reply.

I am going to share the schedule with our project members.
If anything wrong happens and need to postpone your schedule, please let me know.

Thanks,

Emi
Solution
Hello Emi,

Good news, the new version was already uploaded, and a refresh references will be enough to update the component in your project.
Please let me know if all went fine or if you continue to have any other troubles.

Thank you!
Solution
Hi Sara-san,

Thank you for your update.

I am going to test with our applications and will let you know if anyring went wrong.

Thanks,


Emi
Hi Sara-san,

We have tested the new CustomMasks with our applications and confirmed that it is working fine without any problem.
We really appreciate your help.

Thank you,

Emi
Hello Emi,

I'm glad to know that the new version solved your issue.
Feel free to give feedback about the component anytime.

Thank you!

Sara Gonçalves

Can you update to the latest version (3.3.2-109)  and make it available for all stacks again?

Thanks.

Tiago Flor wrote:

Can you update to the latest version (3.3.2-109)  and make it available for all stacks again?

Thanks.

Hi Tiago,

I didn't validate the behavior in Java but since there is nothing specific to some stack I already made it available for all stacks :)

Cheers

Latest version (3.0.0) broke functionality, the inputs with masks have underline and calendar inputs show calendar when page loads.