{"action":"created","issue":{"url":"https://api.github.com/repos/AvaloniaUI/Avalonia/issues/1674","repository_url":"https://api.github.com/repos/AvaloniaUI/Avalonia","labels_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/issues/1674/labels{/name}","comments_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/issues/1674/comments","events_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/issues/1674/events","html_url":"https://github.com/AvaloniaUI/Avalonia/issues/1674","id":331510793,"node_id":"MDU6SXNzdWUzMzE1MTA3OTM=","number":1674,"title":"TextBox AcceptsReturn completely broken","user":{"login":"drlagos","id":3514496,"node_id":"MDQ6VXNlcjM1MTQ0OTY=","avatar_url":"https://avatars0.githubusercontent.com/u/3514496?v=4","gravatar_id":"","url":"https://api.github.com/users/drlagos","html_url":"https://github.com/drlagos","followers_url":"https://api.github.com/users/drlagos/followers","following_url":"https://api.github.com/users/drlagos/following{/other_user}","gists_url":"https://api.github.com/users/drlagos/gists{/gist_id}","starred_url":"https://api.github.com/users/drlagos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drlagos/subscriptions","organizations_url":"https://api.github.com/users/drlagos/orgs","repos_url":"https://api.github.com/users/drlagos/repos","events_url":"https://api.github.com/users/drlagos/events{/privacy}","received_events_url":"https://api.github.com/users/drlagos/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-06-12T09:34:52Z","updated_at":"2018-06-12T21:36:57Z","closed_at":null,"author_association":"NONE","body":"Avalonia Version 0.6.1, Windows 7\r\n\r\nMainWindow.xaml:\r\n```\r\n<Window xmlns=\"https://github.com/avaloniaui\"\r\n        xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n        Title=\"DxEditor\">\r\n    <TextBox AcceptsReturn=\"true\">\r\n        Hello World!\r\n    </TextBox>\r\n</Window>\r\n```\r\n\r\nRun the app, press enter on the textbox. \r\nCaret doesn't move to the line below, just adds what looks like 2 spaces.\r\n(The actual text is modified correctly)\r\n\r\nThe next keypress does add a newline, but the caret is misaligned by 2 spaces and on the wrong line.\r\nIf you actually write text (like abc), it appears in the real position (so one line below the caret)\r\nThe caret is moved to the right position.\r\n\r\nPush 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.\r\n\r\nI wish I could help fix this but I have no knowledge of low level GUI programming."},"comment":{"url":"https://api.github.com/repos/AvaloniaUI/Avalonia/issues/comments/396742741","html_url":"https://github.com/AvaloniaUI/Avalonia/issues/1674#issuecomment-396742741","issue_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/issues/1674","id":396742741,"node_id":"MDEyOklzc3VlQ29tbWVudDM5Njc0Mjc0MQ==","user":{"login":"ivanatpr","id":2243835,"node_id":"MDQ6VXNlcjIyNDM4MzU=","avatar_url":"https://avatars1.githubusercontent.com/u/2243835?v=4","gravatar_id":"","url":"https://api.github.com/users/ivanatpr","html_url":"https://github.com/ivanatpr","followers_url":"https://api.github.com/users/ivanatpr/followers","following_url":"https://api.github.com/users/ivanatpr/following{/other_user}","gists_url":"https://api.github.com/users/ivanatpr/gists{/gist_id}","starred_url":"https://api.github.com/users/ivanatpr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ivanatpr/subscriptions","organizations_url":"https://api.github.com/users/ivanatpr/orgs","repos_url":"https://api.github.com/users/ivanatpr/repos","events_url":"https://api.github.com/users/ivanatpr/events{/privacy}","received_events_url":"https://api.github.com/users/ivanatpr/received_events","type":"User","site_admin":false},"created_at":"2018-06-12T21:36:57Z","updated_at":"2018-06-12T21:36:57Z","author_association":"NONE","body":"I also ran into this issue a few days ago while playing with NetCore/Skia on Windows. I confirmed it was still there where running against the current master and found a solution that seemed to work, which is to add an extra blank line whenever the last line ended with a newline character, and submitted a pull request for it.\r\n\r\nThere was also a separate issue where the line widths weren't being calculated correctly because the code was using an uninitialized (for the current line) value for line.Start. This seemed to solve a few additional minor oddities I noticed when playing around with the textbox control and now it behaves as expected."}}
{"actor":{"display_login":"ivanatpr"}}