# Text Editor Visibility/Focus

**URL:** <https://forum.inductiveautomation.com/t/text-editor-visibility-focus/93116>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [July 11, 2024, 8:49pm UTC](https://forum.inductiveautomation.com/t/text-editor-visibility-focus/93116 "2024-07-11T20:49:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rupali\_Sarathy](https://avatars.discourse-cdn.com/v4/letter/r/c4cdca/32.png) [@Rupali\_Sarathy](https://forum.inductiveautomation.com/u/Rupali_Sarathy)\
**Post date:** [July 11, 2024, 8:49pm UTC](https://forum.inductiveautomation.com/t/text-editor-visibility-focus/93116/1 "2024-07-11T20:49:51Z")

</div>

Hi! I've been running to an issue in Perspective:

I've scripted a button so that when pressed, the focus of a separate text field is enabled using .focus().

However, I want this text field to NOT be visible. When I change the text field to non-visible, the focus is no longer executed when the button is pressed. Has anyone ran into this visibility issue in Perspective, and is there a workaround?

---

<div class="post-metadata">

**Author:** ![simeonw](https://avatars.discourse-cdn.com/v4/letter/s/4da419/32.png) [@simeonw](https://forum.inductiveautomation.com/u/simeonw)\
**Post date:** [July 11, 2024, 9:04pm UTC](https://forum.inductiveautomation.com/t/text-editor-visibility-focus/93116/2 "2024-07-11T21:04:50Z")

</div>

> [@Rupali\_Sarathy](#):
>
> e. When I change the text field to non-visible, the focus is no longer executed when the button is pressed. Has anyone ran into this visibility issue in Perspective, and is there a workaround?

Elements that aren't visible, or have display:none set, are not focusable. Setting the element's **style.opacity** to **0** to hide it and **1** to show it, should work though.
