Skip to content

[Playground][Wasm][Chrome][Grid] TextBox does not clear on single click of clear button #2201

Open

Description

@StewartPolsky

Current behavior

playground text clear bad

Expected behavior

playground text clear good

How to reproduce it (as minimally and precisely as possible)

Visit https://playgroundcanary.z19.web.core.windows.net/#grid
Enter text in any TextBox
Attempt to clear TextBox
Notice that clicking "X" does not clear text after one click

Environment

Nuget Package:

Package Version(s):

Affected platform(s):

  • iOS
  • Android
  • WebAssembly
  • WebAssembly renderers for Xamarin.Forms
  • Windows
  • Build tasks
  • Solution Templates

Visual Studio:

  • 2017 (version: )
  • 2019 (version: )
  • for Mac (version: )

Relevant plugins:

  • Resharper (version: )

Anything else we need to know?

Activity

  1. added
    kind/bug
    triage/untriaged
    on Nov 26, 2019
  2. jeromelaban commented on Nov 27, 2019

    @jeromelaban
    Member

    Related to #2138

  3. removed
    triage/untriaged
    on Nov 27, 2019
  4. francoistanguay commented on Aug 29, 2020

    @francoistanguay
    Contributor

    Isn't this fixed in latest?

  5. modified the milestone: 3.1 on Aug 29, 2020
  6. added
    project/text 🔤
    on Sep 21, 2020
  7. added
    area/grid
    on Oct 8, 2020
  8. added
    difficulty/tbd
    on Feb 15, 2021
  9. MartinZikmund commented on Aug 3, 2026

    @MartinZikmund
    Member

    Reopened by this audit — the issue was closed, but items from its own Definition of Done are still outstanding on feature/breakingchanges.

    Audit result: PARTIALLY DONE in feature/breakingchanges (as of 43acbf69dd).

    The public/protected surface of Uno.UI, Uno.UWP, Uno.Foundation, Uno.UI.Composition and Uno.UI.Dispatching was swept against the WinAppSDK reference assemblies and eight accidental narrowings were widened. A follow-up cross-check against Uno's own generated reference metadata still finds two constructor-level narrowings that were not caught.

    • Uno.UI widenings verified on branch — src/Uno.UI/UI/Xaml/Controls/Repeater/ItemsRepeaterScrollHost.cs:229/231 now public double HorizontalAnchorRatio / VerticalAnchorRatio; src/Uno.UI/UI/Xaml/Controls/Repeater/ItemsSourceView.cs:53 now public int IndexOf(object item); src/Uno.UI/UI/Xaml/Controls/ScrollPresenter/SnapPoint.cs:614/616 and :1495/1497 now public double Start / End.
    • Uno.UWP widenings verified on branch — src/Uno.UWP/Graphics/PointInt32.cs:8, RectInt32.cs:10 and SizeInt32.cs:10 declare public constructors, so new PointInt32(x, y) / new SizeInt32(w, h) compile against Uno as they do against WinAppSDK.
    • Originating defect — Hyperlink.UnderlineStyleProperty is public (src/Uno.UI/UI/Xaml/Documents/Hyperlink.cs:120). fix: Make Hyperlink.UnderlineStyleProperty public for WinUI API parity #23653 targeted master; the fix reached this branch via the automated sync rather than directly.
    • Cross-checked — all eight widenings corroborated against the WinUI IDL (ItemsRepeater.idl:379-392 and :146, ScrollPresenterPrimitives.idl:70-78). A separate sweep for protected-in-Uno / public-in-WinUI members returned nothing, and the internal overloads that surfaced (e.g. FlyoutBase.Hide(bool), DependencyProperty.Register internal overloads, UIElement.Focus(FocusState, bool, ...)) all have a public sibling, so they are not narrowings.

    Fixed by #23668, #23653

    Remaining

    • src/Uno.UI/UI/Xaml/Controls/ColorPicker/ColorPickerSliderAutomationPeer.cs:14 — internal ColorPickerSliderAutomationPeer(ColorPickerSlider owner) on a public partial class should be public. The generated reference declares the identical signature (src/Uno.UI/Generated/3.0.0.0/Microsoft.UI.Xaml.Automation.Peers/ColorPickerSliderAutomationPeer.cs:11), and the siblings SliderAutomationPeer.cs:22 / ColorSpectrumAutomationPeer.cs:26 are already public. Same defect shape as fix: Make Hyperlink.UnderlineStyleProperty public for WinUI API parity #23653.
    • src/Uno.UI/UI/Xaml/Media/Animation/ObjectKeyFrameCollection.cs:9 — the sealed class's only constructor is internal ObjectKeyFrameCollection(DependencyObject, bool); the reference declares a public parameterless ObjectKeyFrameCollection() (src/Uno.UI/Generated/3.0.0.0/Microsoft.UI.Xaml.Media.Animation/ObjectKeyFrameCollection.cs:14, microsoft.ui.xaml.coretypes.idl:3108-3111). Siblings DoubleKeyFrameCollection.cs:12 and ColorKeyFrameCollection.cs:7 already expose public parameterless constructors, so new ObjectKeyFrameCollection() compiles against WinAppSDK but not Uno. Neither of these is a CsWinRT composability artifact, so the PR's projection-artifact rule-out does not cover them.
    • No verification tooling or regression guard was committed, so the sweep is a one-shot snapshot. Consider committing the audit tool, or a unit test over the generated // Skipping already declared method markers, so this cannot silently regress.

    Audit is code inspection against the branch worktree; no build or runtime validation was performed.

  10. added
    native-only
    on Oct 14, 2026
  11. MartinZikmund commented on Nov 7, 2026

    @MartinZikmund
    Member

    Thanks for the report. This was filed against the 2019 WebAssembly renderer, where each TextBox was backed by a DOM <input> and the clear button could lose the click to focus/blur handling on that element.

    In current master the TextBox clear button is handled in shared code: TextBoxCore wires the template's DeleteButton part to DeleteButtonClick(), which sets Text = string.Empty directly (TextBoxCore.cs). Text input on WebAssembly now goes through an overlay input extension rather than a per-TextBox DOM element, so the original cause looks gone. The playground link in the report is also no longer something we can use to reproduce.

    I could not confirm this beyond reading the code. Could you check whether the clear button still needs a second click on the latest Uno version (or 7.0 previews) and, if so, share a minimal repro? If it works now, please let us know and we will close this.

    This was checked as part of an AI-assisted backlog review by reading the code, not by running it. If it looks wrong, please reply and we will take another look.

  12. added
    triage/potentially-fixed
    difficulty/medium 🤔
    and removed
    difficulty/tbd
    on Nov 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/griddifficulty/medium 🤔kind/bugnative-onlyno-reproproject/text 🔤triage/potentially-fixed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions