P: Multi-line text cannot be pasted into EditText (Windows, JavaScript)

0 Votes
New Here ,
Oct 20, 2020 Oct 20, 2020

Copy link to clipboard

Copied

A script is working properly on Mac, but not Windows. Users are expected to paste multi-line text into a text field. The Windows version is clipping that text to the first line, where as the Mac version allows the whole block to be pasted in.

 

Example input:

Some text

that spans

multiple lines

 

On paste, windows clips to:

Some text

 

 

The 'multiline' property has no noticeable effects.

 

function addLongTextField(panel) {
 
    panel.filenamesText = panel.add("EditText",undefined,"")
    panel.filenamesText.minimumSize = [400,200];
    panel.filenamesText.multiline = true;
    return panel
}
Bug Investigating
TOPICS
macOS, Windows

Views

16

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
3 Comments
New Here ,
Oct 20, 2020 Oct 20, 2020

Copy link to clipboard

Copied

Some more API property declaration inconsistency, but this works if you declare the 'multiline' property on instantiation.

function addLongTextField(panel) {
 
    panel.filenamesText = panel.add("EditText",undefined,"",{multiline: true})
    panel.filenamesText.minimumSize = [400,200];
    return panel
}

Votes

Translate

Translate

Report

Report
Adobe Employee ,
Oct 20, 2020 Oct 20, 2020

Copy link to clipboard

Copied

Thanks. I've asked engineering to take a look.


Senior Product Manager - Customer Advocacy - Digital Imaging

Votes

Translate

Translate

Report

Report
Adobe Community Professional ,
Oct 20, 2020 Oct 20, 2020

Copy link to clipboard

Copied

LATEST

From the Object Model Viewer:

"EditText.properties   
Data Type: Object 
ScriptUI Classes 
An object that contains one or more creation properties of the container (properties used only when the element is created).
Creation properties of an EditText object can include: 
multiline : When false (the default), the control displays a single line of text. When true, the control displays multiple lines, in which case the text wraps within the width of the control. 
readonly : When false (the default), the control accepts text input. When true, the control does not accept input but only displays the contents of the text property. 
noecho : When false (the default), the control displays input text. When true, the control does not display input text (used for password input fields). 
enterKeySignalsOnChange : When false (the default), the control signals an 
onChange event when the editable text is changed and the control loses the keyboard focus (that is, the user tabs to another control, clicks outside the control, or types Enter). When true, the control only signals an  onChange()  event when the editable text is changed and the user types Enter; other changes to the keyboard focus do not signal the event. 
wantReturn : Only applies to multiple line edit controls in ScriptUI Version 6.0 or later. When true the RETURN/ENTER keystroke is considered as text-input advancing the cursor to the next line. The default value is false."

Votes

Translate

Translate

Report

Report