Page 1 of 1

'slct' event fires only when Libraries panel is open

Posted: Tue Feb 07, 2017 6:45 pm
by lk4
Hi guys,

I'm trying to listen for 'slct' event in my sample panel plugin. Weirdly it gets fired only when Libraries panel is open (cc 2017 and cc 2015).
Do you know any workaround for this? I'm trying to listen for event when user selects layer or shape (with path tool or move tool). It works great only when Libraries panel is open. It doesn't work at all when I close Libraries.

Here's my code for event listener:

Code: Select all

var event = new CSEvent("com.adobe.PhotoshopRegisterEvent", "APPLICATION");
event.extensionId = "com.lukas.samplepanel";
// Event id of 'slct'
event.data = "1936483188";

csInterface.dispatchEvent(event);
csInterface.addEventListener("PhotoshopCallback", function() {
alert('slct fired');
});

Thanks a lot