Skip to content

Commit

Permalink
Try
Browse files Browse the repository at this point in the history
  • Loading branch information
kerams committed Dec 3, 2024
1 parent da4be92 commit c5a7756
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/iOS/Avalonia.iOS/TextInputResponder.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Runtime.InteropServices;
using Avalonia.Controls.Presenters;
using Avalonia.Input;
Expand Down Expand Up @@ -164,8 +164,8 @@ private void KeyPress(Key key, PhysicalKey physicalKey, string? keySymbol)

if (_view._topLevelImpl.Input is { } input)
{
input.Invoke(new RawKeyEventArgs(KeyboardDevice.Instance!, 0, _view.InputRoot,
RawKeyEventType.KeyDown, key, RawInputModifiers.None, physicalKey, keySymbol));
//input.Invoke(new RawKeyEventArgs(KeyboardDevice.Instance!, 0, _view.InputRoot,
// RawKeyEventType.KeyDown, key, RawInputModifiers.None, physicalKey, keySymbol));

input.Invoke(new RawKeyEventArgs(KeyboardDevice.Instance!, 0, _view.InputRoot,
RawKeyEventType.KeyUp, key, RawInputModifiers.None, physicalKey, keySymbol));
Expand Down Expand Up @@ -221,7 +221,7 @@ string IUITextInput.TextInRange(UITextRange range)
string result = "";
if (string.IsNullOrEmpty(_markedText))
{
if(surroundingText != null && r.EndIndex < surroundingText.Length)
if (surroundingText != null && r.EndIndex <= surroundingText.Length)
{
result = surroundingText[r.StartIndex..r.EndIndex];
}
Expand Down

0 comments on commit c5a7756

Please # to comment.