[Custom Input Masks] Cursor at the end of value when using TAB-key.

Forge Component
(44)
Published on 23 Jul (3 weeks ago) by Huarlem Lima
44 votes
Published on 23 Jul (3 weeks ago) by Huarlem Lima

Hello,

I have a question regarding the Custom input mask component.

I've got a Table Records and use the TAB-key to go through the table. When I come to the input field with the Custom input mask component, the cursor is at the end of the value.


But actually what I want is that the whole value gets selected. Like this:


Is there an advanced option for that or how can I get this behavior?


Kind regards,

Rik

Hi Rik, 

For this behavior, try adding a Jquery to select the input when it gets focus.

To do this, in the extended properties of your input, add "$(this).select();" to the onfocus event.


Huarlem Lima wrote:

Hi Rik, 

For this behavior, try adding a Jquery to select the input when it gets focus.

To do this, in the extended properties of your input, add "$(this).select();" to the onfocus event.


Hi,

Thanks for your response.

Unfortunately it doesn't work.

Kind regards,

Rik

Hi Rik,

The component manages events, so this approach does not work. However, I was looking for the solution and the new version of the Jquery plugin already allows do that.

https://github.com/RobinHerbots/Inputmask/issues/2137


I customized the component and I believe it already allows the desired behavior, I will align it with the team that developed it to see the possibility of releasing a new version.


Huarlem Lima wrote:

Hi Rik,

The component manages events, so this approach does not work. However, I was looking for the solution and the new version of the Jquery plugin already allows do that.

https://github.com/RobinHerbots/Inputmask/issues/2137


I customized the component and I believe it already allows the desired behavior, I will align it with the team that developed it to see the possibility of releasing a new version.


Hi, 

Good job. This looks like the behavior I need.

Let me know what the outcome is of the meeting between you and the developer team. 

Regards


 

Hi Rik,

The component was updated with version 5.0.0 of the plugin.

Please update your component and try again.

Regards

Huarlem Lima wrote:

Hi Rik,

The component was updated with version 5.0.0 of the plugin.


Please update your component and try again.

Regards

 Hi,

After updating the component, we've got a new problem.

The input field gets multiplied by 100 after submitting the page. 

So if you fill in 1, the input field saves 100.

Kind regards,

Rik