Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

ESC from Dropdown List (script trigger)


This topic is 939 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

A user is in a field which displays a dropdown list and hits the 'ESC' key, thereby selecting no item from the list. I'd like to trigger a script at this point, but it seems that simply closing the dropdown list by means of the ESC key, remaining within the same field, cdoesn't fall within the functionality of any of the script triggers. Is this correct? Is there a workaround?

 

Put in a different way, if a user hits the ESC key, opting not to select an item from the dropdown list, I want to close the popover which holds that field. Is this possible?

 

Thanks

Posted (edited)

Try attaching an OnObjectKeystroke script trigger to the field. Then have your script do the action if:

 Code ( Get(TriggerKeystroke) ) = 27

---

Sorry, that won't work in your situation. Apparently when a drop-down is activated, the ESC keystroke is interpreted as a keyboard shortcut to de-activate it and not passed further to the script triggering mechanism.

 

Edited by comment
Posted

Maybe rethink the ux? Have them edit in a global in a popover with a save button? 

Posted

Do you have a save button in the popover? With that you can update the actual field. If they just dismiss popover, then the field is not edited. 

Posted

There’s no save button. I use a script trigger to perform all required actions when a value is selected into the field. Should the user decide not to select an option from the drop down list, and instead hit the ESC key, I want the popover to close. I don’t see a way to accomplish this without the user having to hit the ESC key twice. 

Posted

I’m picturing something different. User clicks popover “edit” button next to noneditable field. Field value is set into global field using OnObjectEnter script trigger attached to popover. Global field has assigned value list. Popover save button sets global to actual field. Closing popover without clicking save does nothing.

Posted

Thanks, but I do all possible to limit keystrokes. I don’t want to include a button. Someone selects an entry from the list, popover closes. 

This topic is 939 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.