Perspective Blur through scripting

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 :slight_smile: .

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

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!

2 Likes