Skip to content

Bug when pasting multiple lines into a textfield #19

@doekman

Description

@doekman

There is a bug when pasting text into a textfield that contains a newline.

When you have a Pashua form with the following control:

name.type = textfield
button.type = defaultbutton

and you copy/paste the following text into it (only select one newline):

Line one
Line two

When pasting you see the text Line two in the textfield. When you leave the field by pressing the tab-key, you see 'Line one`. Now press the OK button. Pashua will return the following text:

name=Line one
Line two
button=1

Expected behaviour

For starters, when pasting the newlines should be removed (or replaced by spaces).

Also, a control should never output text with multiple lines. When not converting new lines, Pashua should return this (like a textbox control would handle it:

name=Line one[return]Line two
button=1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions