Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.


Use EventListeners without being prone to "Modal Dialog" crash?

Participant ,
Mar 16, 2021 Mar 16, 2021

Copy link to clipboard

Copied

Hey!

Does anybody have an idea if there is a safer way to use addEventListener to simulate a button functionality on hover and press?

Using this method makes my script mroe likely to crach if a modal dialog pops up (like the Auto-Save one), as well as when a modal dialog is already open and the user hovers above the panel, which triggers the event (even though the script panel is supposedly inactive).

 

It's painful because it makes the panel freeze without notice, then you need to relaunch it to get the error, then relaunch it again to actually relaunch the script.

 

I am trying to create a custom button that highlights on hover. There is nothing wrong with this method until this happens.

 

Does anyone have an idea of what I should do instead?

Thankya!

TOPICS
Scripting

Views

32

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation