cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

Beware in ThingWorx 9: EnterKeyPressed works differently

DanWolf
12-Amethyst

Beware in ThingWorx 9: EnterKeyPressed works differently

Sorry if this was already mentioned somewhere. I searched and didn't find it.

 

In ThingWorx 9, the EnterKeyPressed binding now behaves like "Focus Lost".  If you have textfield with the EnterKeyPressed action bound, that action will be fired whenever focus leaves the text field.  I opened a case with PTC when I discovered the behavior and was told it is working to specification: "this event is triggered when a user clicks an area outside the widget or presses the enter key after updating the widget value".

 

We're most affected with some mashups that have several text fields for optional user input.  Prior to ThingWorx 9, the user could enter something in one of the text fields and press enter to trigger the action, or tab to the next field and optionally press enter there, etc.  Now if the textfield has the EnterKeyPressed action bound, that action runs when the user presses tab to go to the next textfield.

 

1 ACCEPTED SOLUTION

Accepted Solutions
slangley
23-Emerald II
(To:DanWolf)

Hi @DanWolf.

 

I did confirm that this is working by design.  However, please feel free to post a request on the ThingWorx Ideas board.  This will allow others to vote for it.  With enough votes, an update to the current design may be considered for a future release.

 

Regards.

 

--Sharon

View solution in original post

2 REPLIES 2
slangley
23-Emerald II
(To:DanWolf)

Hi @DanWolf.

 

I did confirm that this is working by design.  However, please feel free to post a request on the ThingWorx Ideas board.  This will allow others to vote for it.  With enough votes, an update to the current design may be considered for a future release.

 

Regards.

 

--Sharon

DanWolf
12-Amethyst
(To:slangley)

Thanks, Sharon.  The big problem I have with this is the functionality unexpectedly changed in ThingWorx 9.  Prior to ThingWorx 9, "EnterKeyPressed" behaved like "Enter Key Pressed". It only fired if the enter key was pressed in a textfield, not when focus left the textfield.

 

When something that was working "normally" was unexpectedly changed, we shouldn't have to create an "idea" to revert the behavior.  Unfortunately, we just have to live without the "nice" feature of being able to press the enter key (and only that) to fire an action.  At least, the action should be renamed from "EnterKeyPressed" to "FocusLost", because that's what it does now.

 

 

Top Tags