[javascript glitch] app.execDialog multiline static text is selected by default  SOLVED

Forum for the PDF-XChange Editor - Free and Licensed Versions

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Paul - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange

User avatar
Mathew
User
Posts: 880
Joined: Thu Jun 19, 2014 7:30 pm

[javascript glitch] app.execDialog multiline static text is selected by default

Post by Mathew »

The custom dialog app.execDialog seems to ignore 'first_tab' property and always selects the first selectable item in the dialog. When a multiline static_text item is first, it will always select the text. I'd expect this for an edit_text item, but not for static_text:
image.png

Code: Select all

// multiline example

{
const dia = {
  description: { name: "Multiline static text", width: 400, first_tab: 'okbt', elements: [
    { type: 'static_text', width: 400, name: "The following text is in a multiline static_text and always seems to be selected, regardless of whether first_tab is set to anything"},
    { type: 'static_text', width:400, multiline: true, char_height:4, name: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." },
    { type: 'ok', item_id: 'okbt'}
  ]}
};

app.execDialog(dia);
}
You do not have the required permissions to view the files attached to this post.
User avatar
Daniel - PDF-XChange
Site Admin
Posts: 13119
Joined: Wed Jan 03, 2018 6:52 pm

Re: [javascript glitch] app.execDialog multiline static text is selected by default

Post by Daniel - PDF-XChange »

Hello, Mathew

Thank you for the report, I have escalated this to the Dev team for review.

Kind regards,
Dan McIntyre - Support Technician
PDF-XChange Co. LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
[email protected]
User avatar
Ivan - Tracker Software
Site Admin
Posts: 3611
Joined: Thu Jul 08, 2004 10:36 pm

Re: [javascript glitch] app.execDialog multiline static text is selected by default  SOLVED

Post by Ivan - Tracker Software »

The problem occurs because, at the moment, we do not handle the first_tab and next_tab properties.
In 11.1.0, we have added handling of first_tab, but not next_tab, as it requires some serious changes.
PDF-XChange Co Ltd. (Project Director)

When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.