Blur text fields when Enter/Return hit

Make this “code” built in:

export function myTextField_keyPress(event) {
if (event.code === 13)
$w(“#personalText”).blur();
}

Can’t you use .disabled() until this would be built in?

well, a typical use-case I was/am trying to solve is “when user is done entering their name [single line text input], update the page to reflect user-name”.
I tied this to a “blur” action on the text field.

but since it’s a single-line - I want the Enter/Return key to also cause “blur”.

What I did was write an onKeyPress event - but I think it’d be cool to have this build in.

Hi, I want to use blur effects on my website.

It should work such as follow;

On dynamic item page, the content text should be blured for someone who have not logged in yet. If this guy decide to log in my website, text will be visible for him(blur removed).

So, how can I deal with ?

It has nothing to do with the current thread (“blur” here has a different meaning). So you better open a new thread.