What I want to achieve is that I want to display a small editor window when an input is clicked. The user will then be able to change formatting of text in the input from the popup editor.
The editor will be reused for several inputs, so I will also need to save the input number as a state so the editor will apply for the correct input.
The problem is that there is no such event âInput is focusedâ. Also in the âElement is clickedâ event, inputs are not available to choose. I am wondering whyâŚ
Currently I display a transparent shape on the top of the input and run a workflow when the shape is clicked and then hide it. But this is a workaround.
Hey @philipp.ko I think you could achieve this using three elements:
Input
Hidden Button (thatâs transparent and not visible on page load, anywhere on the page)
Group (the editor element, not visible on page load)
Then you could place a conditional statement on the Hidden Button which is âWhen Input A is focusedâ --> This element is visible. In the workflow you could have a âDo When Condition is Trueâ event. âWhen Button is visible (every time)â --> âShow Groupâ. The User could then use the Editor, and manually close it using an X icon. Or, you could create other conditional statements/âDo When Condition is Trueâ events that would hide that group once a different input is focused, for example.
Thank you, fayewatson! This seems to be somewhat simpler then what I am doing. However this is also a workaround. I will definitely try it, but I think I will also post a feature request for allowing Workflows when input is focused.
No problem! Yes itâs definitely similar to what you were doing. One other thing I was thinking you could do is change the conditional statement on the Hidden Button to be âWhen Input is focused OR Group is hoveredâ --> This element is visible. That way the editor is visible when the input is focused or if the user then moves from the input to the editor. Then you could have another event in the workflow which is âWhen Button isnât visible (every time)â --> Hide Group. That way the editor is shown/hidden depending upon what the User is doing.
A somewhat hacky workaround Iâve used successfully in the past is that you can copy the âis focusedâ expression from the conditional tab for your element and paste it into the 'When a conditionâŚ" workflow expression editor and it will work as expected.
I canât say why this isnât exposed natively in the editor, however its possible bubble may kill this, but itâs saved me countless dummy elements and the additional logic and workflows required for what should be a simple event trigger. Iâve used it and never looked back
what if you were to place all the input elements into a group element. Then every time that group element is clicked perform action? If Iâm not wrong this can achieve the desired result.
I used this method to show info windows everytime an input is clicked
Wow⌠This does work. I have been stumped with something so simple and had to resort to countless workarounds and âhacksâ to use when trying to get workflow to trigger when an input is focused. This just saved me future time and workarouds. Something so easy and somewhat on the nose . Honestly this should be part of bubbleâs conditionals or event triggers but isnât. Hopefully itâs already being worked on.
Grazie
Came by to add on a simpler workaround, works inside repeating groups too.
Simply put the input inside a group. Then just run the workflow on the parent group of the input. No need for recurring workflows or additional conditionals.