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

ScriptUI bug with InDesign 2021, impossible to type in EditText

People's Champ ,
Apr 28, 2021 Apr 28, 2021

Copy link to clipboard

Copied

There seems to be a new ScriptUI bug in InDesign 2021 on Windows.

If you create a window with an EditText widget, and set the EditText to be active (which is theoretically supposed to give it the keyboard focus) it becomes impossible to type anything in it.

Ironically, not setting it to "active" is okay.

Here's a test script:

 

testWindow();

function testWindow(){
	var x,w;
	w = new Window("dialog", "Type something...");
	x = w.add("editText");
	x.characters = 20;
	x.active = true;
	w.show();
}

 

 If this is run on Windows 10 with InDesign 2021 I'm not managing to type anything into the text field.

But changing x.active to "false", or commenting out that line, fixes the problem (although the text field then does not have the keyboard focus, of course).

Seems to be ok on MacOS. And InDesign 2020 on Windows.

Can anyone confirm?

Thanks,

Ariel

TOPICS
Bug , Scripting

Views

278

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
Community Expert ,
Apr 28, 2021 Apr 28, 2021

Copy link to clipboard

Copied

Hi Ariel, Your sample script worked for me on ID 16.1 x64 on Windows 10. The box had active focus upon execution and I was able to type into it. If it matters, I ran it through the Script panel, not the Toolkit or VS Code. 

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
People's Champ ,
Apr 28, 2021 Apr 28, 2021

Copy link to clipboard

Copied

Hmm. Just tried it myself again after restarting InDesign, and as you say, it seems to work ok. However, this has happened intermittently for a while now, so I guess I still need to figure out what triggers it. It's not quite as simple as I had hoped!

Thanks for the feedback!

Ariel

 

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
Guru ,
Apr 28, 2021 Apr 28, 2021

Copy link to clipboard

Copied

It works for me as expected: no problem occurs when run both from ESTK and the scripts panel.

Windows 10 (version 1909), InDesign 16.1 x64.

— Kas

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
Guide ,
Apr 29, 2021 Apr 29, 2021

Copy link to clipboard

Copied

Hi Ariel,

Works fine here: ID 16.1.x64 / Win 10 Pro 1909.

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
Community Expert ,
Apr 29, 2021 Apr 29, 2021

Copy link to clipboard

Copied

Hi Ariel,

tested your code with:

German InDesign 2021 version 16.1.0.20

Windows 10 Pro 2004

No issues.

 

More details on Prerelease.

All fine also there.

 

Regards,
Uwe Laubender

( ACP )

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
People's Champ ,
Apr 29, 2021 Apr 29, 2021

Copy link to clipboard

Copied

LATEST

Thanks Uwe!

 

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