Conditional visibility on leave

0
On Native page, I have a username and conditionally visible password textbox: Based on attribute value, either password txtBox with hidden text or the other one with visible text is displayed: Icons below change / toggle the visible state of text on their click. Icon is displayed when user enters the password field. On leave field, icon should disappear.  Athough whole row is formatted as if icon was part of the textbox, they are separate widgets. This leads to fact that when user attempts to click on icon, first the on leave event triggers (icon is outside of textbox), which hides icon and thus icon click doesn't happen. Can someone suggest a solution please or do I miss something obvious?
asked
2 answers
1

Hi Tomas,

 

What about adding a Boolean to the PasswordHelper that drives the visibility of the two textboxes and the icons, and removing the Events? Then, after clicking the icon, change the boolean value. 

 

Look into the developer's tools to see if the password is visible in cleartext on the page, as you might have an issue if so, depending on your use case.

 

Go Make It

answered
0

Hi Marco,

Thanks, could you describe in more details pls?

I have 2 boolean values initialized as False:

image.png

Based on "ShowPassword" value, 1 textbox and 1 of the icons will show:

image.png

However, first time icon shows is on entering textbox. This changes "ShowIcon" to True via nanoflow. On text box leave, the "ShowIcon" is set back to False and current icon disappears, which is desired. Problem is clicking on Icon to change "ShowPassword" via nanoflow. As icon is outside of textbox, so on leave event is fired first before actual click on icon has chance to happen.

answered