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

ScriptUI addEventListener broken

Contributor ,
Mar 24, 2023 Mar 24, 2023

Copy link to clipboard

Copied

Hi,

I am keeping a few old ScriptUI palettes (which have been converted to CEP) as test environment for debugging the extendscript parts. I just noticed that, in Illustrator 24, it was possible to use

button.addEventListener('click', function(ev) { if(ev.shiftKey) ... });

Now, in Illustrator 27, click does no longer call the function.

Here is a workaround

button.onClick = function() {
  var state = ScriptUI.environment.keyboardState;
  if(state.shiftKey) ...  };
TOPICS
Scripting

Views

158

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
Adobe
Community Expert ,
Mar 24, 2023 Mar 24, 2023

Copy link to clipboard

Copied

LATEST

thanks for the heads up!

Votes

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