Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

illustrator CC ScriptUI addEventListener('click', …) doesn't work.

Community Beginner ,
Mar 03, 2014 Mar 03, 2014

Hello,

It just a report for others.

I tried to catch 'click' event on Button of ScriptUI through 'addEventListener' on illustratorCC.

However it doesn't work.  CS6 and under the version,  it works well.  The problem is CC only.

I have already searched about it in the forum, and I could find the similar situation on AfterEffectsCC forum below.

http://forums.adobe.com/message/5449261#5449261

I checked that illustratorCC is also can use only 'mousedown' event, but not to be able to use 'mouseup' and 'click'.

And I tested below codes.

function clickHandler(e)

{

     alert("ok");

}

dlg.btnPnl.btn1.onClick = clickHandler;                                              // It works ! The both of click and enter key.

dlg.btnPnl.btn1.addEventListener('mousedown', clickHandler);        // It works only click.  Enter key doesn't work..

dlg.btnPnl.btn1.addEventListener('click', clickHandler);                    // It doesn't work..

dlg.btnPnl.btn1.addEventListener('mouseup', clickHandler);             // It doesn't work..

It seems to be the best solutions is using

button.onClick = clickHandler;

However I think it might be the common bug on Adobe CC series and it should be solved.

TOPICS
Scripting
1.7K
Translate
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
Adobe
Community Expert ,
Mar 03, 2014 Mar 03, 2014
LATEST

yeah, it was reported in the ID forum, along with a bunch of other things that don't work either

http://forums.adobe.com/message/5447193#5447193

Translate
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