How to not apply lost locus to certain elements?

Hello!
I have created a Material password field that returns to its initial state, if user clicks out of the field.
That works fine with dynamic panels.
Although, I also have an element to toggle its visibility that supports functionality “x”, lost focus functionality “covers” x I have set to the element and instead of doing x, clicking on that returns the field to its initial state.
I have thought of having a box and add the field and the toggle icon within it and then play with lost focus for the box rather than the field, but it didn’t work. Any thoughts?
Thank you

I’m a little unclear on what you’re trying to do. You should be able to have the “Lost Focus” event check for specific conditions and then do one thing or another.

LostFocus.rp (45.3 KB)