Skip to content

Commit

Permalink
fix(autosuggestbox): fix suggestion flyout not opening on user input …
Browse files Browse the repository at this point in the history
…using managed skia textbox
  • Loading branch information
ramezgerges committed Jan 18, 2024
1 parent 75686ce commit 31ac2bc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/Uno.UI/UI/Xaml/Controls/TextBox/TextBox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ protected virtual void OnTextChanged(DependencyPropertyChangedEventArgs e)

RaiseTextChanging();

if (!_isInputModifyingText)
if (!_isInputModifyingText || IsSkiaTextBox)
{
_textBoxView?.SetTextNative(Text);
}
Expand Down Expand Up @@ -1250,7 +1250,7 @@ public void PasteFromClipboard()
#else
{
#endif
Text = currentText;
ProcessTextInput(currentText);
}
#if __SKIA__
finally
Expand Down
10 changes: 5 additions & 5 deletions src/Uno.UI/UI/Xaml/Controls/TextBox/TextBox.skia.cs
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ partial void OnKeyDownPartial(KeyRoutedEventArgs args)
{
_clearHistoryOnTextChanged = false;
_pendingSelection = (selectionStart, selectionLength);
Text = text;
ProcessTextInput(text);
_clearHistoryOnTextChanged = true;
}
_suppressCurrentlyTyping = false;
Expand Down Expand Up @@ -1283,11 +1283,11 @@ public void Undo()
_pendingSelection = currentAction.SelectionEndsAtTheStart ?
(currentAction.SelectionStart + currentAction.SelectionLength, -currentAction.SelectionLength) :
(currentAction.SelectionStart, currentAction.SelectionLength);
Text = r.OldText;
ProcessTextInput(r.OldText);
break;
case DeleteAction d:
_pendingSelection = (d.UndoSelectionStart, d.UndoSelectionLength);
Text = d.OldText;
ProcessTextInput(d.OldText);
break;
case SentinelAction:
break;
Expand Down Expand Up @@ -1321,11 +1321,11 @@ public void Redo()
{
case ReplaceAction r:
_pendingSelection = (r.caretIndexAfterReplacement, 0); // we always have an empty selection here.
Text = r.NewText;
ProcessTextInput(r.NewText);
break;
case DeleteAction d:
_pendingSelection = (Math.Min(d.UndoSelectionStart, d.UndoSelectionStart + d.UndoSelectionLength), 0);
Text = d.NewText;
ProcessTextInput(d.NewText);
break;
case SentinelAction:
break;
Expand Down

0 comments on commit 31ac2bc

Please sign in to comment.