Skip to main content
Matúš — LTTR
Inspiring
March 24, 2023
Question

Ai plugin - handle panel focus lost

  • March 24, 2023
  • 0 replies
  • 158 views

Hey, guys!

 

I'm working on an Illustrator plugin and need to perform a UI action when the panel loses focus, E.g. when the user clicks into the artboard.

 

I'm trying to use the standard javascript event listener on "blur":

`document.body.onblur=function(e)...`

but on my Mac this event is not caught when I stop interacting with the panel and start interacting with the artboard, only when the Adobe Illustrator window loses focus.

 

I'm also trying to hook to an SDK notification, but the only usable I found is the `

kAIArtSelectionChangedNotifier`. It is fired when I click into the artboard but also when art objecs change without interacting with it, which is not what I want.

 

Any ideas?

 

Thanks

This topic has been closed for replies.