I think you're missing the point. I can't store the ID of the edit box that was selected before clicking on the icon.

(forcing the user to first select/highlight the existing text in the edit box so you can use $did().seltext is not an option)