Editor writes content backwards when enclosed within Blazorise Validations component

Aberta
#33 5 comentários 1 reação 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
30/100
Tipo de issue
Bug
Clareza
Razoavelmente clara
Status de atividade
Estagnada
Stack de tecnologia
html
Domínio
frontend

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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";
}
Linguagem predominante
HTML
Estrelas
57
Forks
17
Métricas de merge de PRs
Nenhum PR com merge em 30d

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de tinymce/tinymce-blazor

Todas as issues de tinymce/tinymce-blazor

Issues semelhantes

Mais issues de Web Dev

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.