question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TextBox AcceptsReturn completely broken

See original GitHub issue

Avalonia Version 0.6.1, Windows 7

MainWindow.xaml:

<Window xmlns="https://github.com/avaloniaui"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="DxEditor">
    <TextBox AcceptsReturn="true">
        Hello World!
    </TextBox>
</Window>

Run the app, press enter on the textbox. Caret doesn’t move to the line below, just adds what looks like 2 spaces. (The actual text is modified correctly)

The next keypress does add a newline, but the caret is misaligned by 2 spaces and on the wrong line. If you actually write text (like abc), it appears in the real position (so one line below the caret) The caret is moved to the right position.

Push up to navigate to the first line, then move to the right, the caret will jump to the line below just before reaching the ! character (so you can’t add something in from of the !). You can place the caret after the ! if you use the mouse.

I wish I could help fix this but I have no knowledge of low level GUI programming.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
sirwhinesalotcommented, Jun 13, 2018

Seems to work now, thank you!

0reactions
jmacatocommented, Jun 13, 2018

Confirmed repro of this bug and #1675 fixed it; Thanks @ivanatpr for your contribution 👍
Please recheck this @drlagos if theres any issues still

Read more comments on GitHub >

github_iconTop Results From Across the Web

AcceptsReturn on TextBox not functioning correctly
I have a simple search field on a form that is set as multiline (which I understand is the only way to change...
Read more >
How to use AcceptsReturn Property of TextBox in C#? - ...
Step 1: Create a windows form. · Step 2: Drag the TextBox control from the ToolBox and drop it on the windows form....
Read more >
TextBox.AcceptsReturn Property (System.Windows.Forms)
Gets or sets a value indicating whether pressing ENTER in a multiline TextBox control creates a new line of text in the control...
Read more >
AcceptsReturn Property - Infragistics Windows Forms™ Help
AcceptsReturn Property. Gets or sets a value indicating whether pressing ENTER in a mutiline editor creates a new line of text in the...
Read more >
Solved: Textbox will not accept return - Inventor
Solved: I'm building forms that are hosted inside a dockable window. Multiline textboxes will not allow a 'return' An older addin will work ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found