Editor writes content backwards when enclosed within Blazorise Validations component

Offen
#33 5 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
30/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
html
Bereich
frontend

Rechercherichtung

Start with the linked TinyMceBackwardsRepro repository and reproduce the issue using the Blazorise Form and Validations components shown in the issue. Trace how the editor handles bind-Value and Field updates when validation runs; the issue reports the cursor returning to the start on each keypress. Done means typing keeps the cursor in place and text appears in the intended order.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

GitHub help wanted

Hi, I have run into a very strange issue when using the component inside Blazorise.
Steps to repro (also see repro link here - https://github.com/gdunit/TinyMceBackwardsRepro)

  1. Create Blazorise Form then Validations components
  2. Embed the editor within the Validations (this is required in my solution due to structure of components)
  3. Editor is configured to use bind-Value and Field properties
  4. When the editor is focused, any keypress results in the cursor being returned to the start of the editor and therefore text appears 'backwards' when typed. I strongly suspect this is because of the editor being refocused on each keypress due to something that is triggered by the validation checking.
<Form>
    <Validations Model="@this" ValidateOnLoad="false">
        @*This TextEdit just here to demonstrate relationship to other components in form*@
        <Validation>
            <Field>
                <TextEdit @bind-Text="SingleLineText">
                    <Feedback>
                        <ValidationError/>
                    </Feedback>
                </TextEdit>
            </Field>
        </Validation>
        <Editor Field="@(() => TinyMceRichText)" @bind-Value="TinyMceRichText"></Editor>
    </Validations>
</Form>


@code{

    [Required]
    public string? SingleLineText { get; set; }
    public string? TinyMceRichText { get; set; } = "Hello";
}
Vorherrschende Sprache
HTML
Sterne
57
Forks
17
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus tinymce/tinymce-blazor

Alle Issues in tinymce/tinymce-blazor

Ähnliche Issues

Weitere Issues zu Web Dev

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.