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

P: SDK: Windows edit field truncates multi-line pasted text

0 Votes
LEGEND ,
Oct 06, 2022 Oct 06, 2022

Copy link to clipboard

Copied

On Windows, when you paste multi-line text into an osFactory:edit_field with height_in_lines = 1, all but the first line is discarded. But this doesn't happen when you paste more than two lines into an edit field with height_in_lines = 2 -- all the lines are preserved.  Nor does the bad behavior occur on Mac.  The Windows behavior of height_in_lines = 1 is inconsistent with height_in_lines = 2 and with Mac height_in_lines = 1.

 

This bug affects my Any Filter plugin's user interface -- it's important for users to be able to paste in multiple lines of text into an edit_field that for UI design purposes should otherwise be one line high:

johnrellis_0-1665116440142.png

 

The script below illustrates the problem.  I've attached screen recordings of running it on Windows and Mac.

 

 

 

local LrBinding = import "LrBinding"
local LrDialogs = import "LrDialogs"
local LrFunctionContext = import "LrFunctionContext"
local LrView = import "LrView"

local bind = LrView.bind
local f = LrView.osFactory()

LrFunctionContext.callWithContext ("", function (context)
    local prop = LrBinding.makePropertyTable (context)
    local controls = f:column {bind_to_object = prop,
        f:edit_field {height_in_lines = 1, width_in_chars = 10,
            immediate = true, value = bind "text1"},
        f:static_text {height_in_lines = 5, width_in_chars = 10,
            title = bind "text1"},
        f:edit_field {height_in_lines = 2, width_in_chars = 10,
            immediate = true, value = bind "text2"},
        f:static_text {height_in_lines = 5, width_in_chars = 10,
            title = bind "text2"}}

    local result = LrDialogs.presentModalDialog {title = "edit_field bug", 
        contents = controls}
    end)

 

 

 

Bug Investigating
TOPICS
macOS , SDK , Windows

Views

34

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 Pinned Reply

Adobe Employee , Oct 07, 2022 Oct 07, 2022

Update Status for Bug

Status Investigating

Votes

Translate

Translate
1 Comment
Adobe Employee ,
Oct 07, 2022 Oct 07, 2022

Copy link to clipboard

Copied

LATEST

Update Status for Bug

Rikk Flohr - Customer Advocacy: Adobe Photography Products
Status Investigating

Votes

Translate

Translate

Report

Report