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

How can I run dialog validation when user hits [RETURN] key?

Engaged ,
Mar 15, 2022 Mar 15, 2022

Copy link to clipboard

Copied

When the user hits the [RETURN] key on the keyboard, a currently displayed dialog is dismissed, but the defaultElement's onClick() handler is not getting called.

 

How can I run validation when the user hits the [RETURN] key, keeping the dialog from closing early?

Views

283

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

correct answers 1 Correct answer

Engaged , Mar 16, 2022 Mar 16, 2022

My observation, hitting the [RETURN] key on the keyboard wouldn't trigger the defaultElement's onClick() handler, was wrong. Today I added an alert("Test") to the onClick() handler and it got triggered all the time.

 

Apologies for not checking thoroughly before posting here!

Votes

Translate

Translate
Adobe Employee ,
Mar 15, 2022 Mar 15, 2022

Copy link to clipboard

Copied

Hi there!

 

I replied to your other post with more questions, the I assume this is about the same panel or script?

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
Engaged ,
Mar 16, 2022 Mar 16, 2022

Copy link to clipboard

Copied

LATEST

My observation, hitting the [RETURN] key on the keyboard wouldn't trigger the defaultElement's onClick() handler, was wrong. Today I added an alert("Test") to the onClick() handler and it got triggered all the time.

 

Apologies for not checking thoroughly before posting here!

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