GlideModal issue with multiple instances of same modal able to be opened from Ui Action

Jake-K
Tera Contributor

Hello,

 

I have a Ui Action with a form button which renders a GlideModal. It works great, but if you click the Ui Action button twice before the modal opens, it will run again and open a second layer of the same modal. Is there a way to limit how frequently the Ui Action can be run, like a debounce function? I was unable to find anything or anybody else discovering this issue. Any help or suggestions would be greatly appreciated!

 

2 REPLIES 2

Maik Skoddow
Tera Patron
Tera Patron

Your question can only be answered if you provide details about your current implementation.

Hi Maik, it's a pretty basic small modal that opens over a Demand record when the Ui Action button is clicked. If the UI Action form button is repetitively clicked again before the first modal has opened (it takes about a second to load the window), the user can stack additional modals that load in over the initial one. So when the Ui Action has been clicked, I want to disable it from being pressed again until the modal has finished loading. Does that make sense? Thank you