# Perspective Blur through scripting

**URL:** <https://forum.inductiveautomation.com/t/perspective-blur-through-scripting/34556>\
**Category:** Ignition Early Access\
**Tags:** perspective\
**Created:** [May 8, 2020, 1:18am UTC](https://forum.inductiveautomation.com/t/perspective-blur-through-scripting/34556 "2020-05-08T01:18:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sam.Bartlett](https://avatars.discourse-cdn.com/v4/letter/s/d07c76/32.png) [@Sam.Bartlett](https://forum.inductiveautomation.com/u/Sam.Bartlett)\
**Post date:** [May 8, 2020, 1:18am UTC](https://forum.inductiveautomation.com/t/perspective-blur-through-scripting/34556/1 "2020-05-08T01:18:17Z")

</div>

After going through a bit of a rabbit hole then experiencing Occam’s razor and spending admitedly too much time to find it; to lose focus on a component whether that’s through pressing the enter key, message handlers, or any other scripted action… use the .focus() method on the root container component 🙂 .

Although your component path may be different the following worked for me to force blur on a text field when pressing the enter key.

```auto
if event.key == 'Enter':
	self.view.getChild("root").focus()

```

As a little (expected) bonus, and something to remember, this triggers the onBlur focus event of the component.

Good luck!
