[Bug-7686] Self-closing Pop-up locks up modal pop-up and entire screen

We have been trying to implement a user feedback popup that lets the user know when something goes wrong or right (Successful update, Failed to Create, etc) that then fades away after a few seconds. We implemented this using a pop-up with a timer script on startup that closes it after 5 seconds, this works. However, we use pop-ups frequently and found that if this user feedback pop-up is opened, then another modal pop-up is opened, then the user feedback pop-up closes followed by closing the modal pop-up, it greys out the entire screen (see below). If you don't have overlay dismiss turned on it freezes up the entire screen and requires a screen refresh to continue.

A teammate and I tested this and found that this bug occurs in 8.1.27 and 8.1.28, but not in 8.1.24.

Has anyone else run into this issue and have a solution?

Are you closing the popup with system.perspective.closePopup('')?
Sounds like a bug if it used to work

I close it using system.perspective.closePopup(popupId), popupId being the popup's ID field.

Figured it might be a bug, but didn't want to assume.

If you're closing the popup that the script is run in, you can just pass in '' to close it

This is a known bug with modal popups. I updated the title to reflect the internal ticket number.

1 Like

We tried this and it didn't work if we opened up another pop-up while that script was running.

1 Like

This doesn't target the popup it's run from but the latest opened popup, I think.
I'd rather always use an id to make sure I'm targeting the right thing.


Well that's a bit silly :frowning:

1 Like

According to the docs, when given an empty string, the most recently focused popup will be closed. However, there is a bug currently that causes the most recently opened popup to be closed instead.

Passing the popup ID is the best way around this bug at the moment.

1 Like

uuids everywhere !

def random_id():
	""" Generate a random id to be used for popups or other things that need to be uniquely identified. """
	return str(uuid.uuid4())