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

Possible to remove highlighted border to selected button in Acrobat

Community Beginner ,
Jan 15, 2025 Jan 15, 2025

Hey everyone! I have recently made an interactive PDF that has a large amount of buttons and show/hide features, and one of the questions that the client has asked is if there is a way to prevent the 'selected button' box highlight from showing in the end. I think this must be a preference to one's own settings on their Acrobat, but I thought I would check here in case someone new? I don't even know what you would call that box other than button selection, so even searching for it is confusing to me. Here are some screenshots of what I am referring to. One shows the box around text (built into a button) and one shows the box around an icon serving as a button. I've also attached the Interactive PDF to the post in case you want to see it happen on your end. 

Thanks for any info you can offer! I'm always referring to the forums, so if the answer exists, I'm confident you all can help.

 

TOPICS
Edit and convert PDFs , Modern Acrobat , PDF , PDF forms
1.1K
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
1 ACCEPTED SOLUTION
Community Expert ,
Jan 15, 2025 Jan 15, 2025

The highlight stays there until a blur event (tabbing to another field or clicking anywhere else in the document).  One way around this is to add the following Mouse Up action script:

this.getField("Text").setFocus();

With "Text" being the name of the next field you would want to the focus to go to.  

View solution in original post

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
Community Beginner ,
Jan 15, 2025 Jan 15, 2025

FWIW, I believe I may have found it, but the question remains if I can remove it from the functionality so that it doesn't show on anyone's computer, regardless of their preferences. Looks like Adobe Preferences refers to it as a "focus rectangle." I'm betting the answer is no.

 

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
Community Expert ,
Jan 15, 2025 Jan 15, 2025

The following script will turn it off:

app.focusRect=false;

However, it's not good practice to change someone's preferences using a form without warning them.  You could obtain their preference, set focusRect to false on Mouse Enter, then return it to their preference on On Blur like this:

Mouse Enter Script

var focus=app.focusRect;
app.focusRect=false;

On Blur Script

app.focusRect=focus;
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
Community Expert ,
Jan 15, 2025 Jan 15, 2025

The highlight stays there until a blur event (tabbing to another field or clicking anywhere else in the document).  One way around this is to add the following Mouse Up action script:

this.getField("Text").setFocus();

With "Text" being the name of the next field you would want to the focus to go to.  

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
Community Beginner ,
Jan 15, 2025 Jan 15, 2025

Thank you! I think that makes sense. Where would I put this script when working it into the buttons? Within InDesign before I export the Interactive PDF? "On click" and then which? I don't see a 'run javascript' option. Or would it need to happen on the PDF after I created it? 

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
Community Beginner ,
Jan 15, 2025 Jan 15, 2025
LATEST

Actually, I found where, or at least what option I found will work. Thanks so much! Problem solved!

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