Editor writes content backwards when enclosed within Blazorise Validations component

Aperta
#33 5 commenti 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
30/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
html
Ambito
frontend

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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";
}
Lingua principale
HTML
Stelle
57
Fork
17
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di tinymce/tinymce-blazor

Tutte le issue di tinymce/tinymce-blazor

Issue simili

Altre issue su Web Dev

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.