weird behavior with kendo editor embedded in a form

2 Answers 23 Views
Editor
Laurent
Top achievements
Rank 1
Iron
Laurent asked on 26 May 2021, 05:02 PM

Hi team,

When kendo editor is embedded in a <form> with other input fields, pressing enter in a field triggers the first button in editor toolbar (maybe because the editor buttons don't have the type=button attribute ?!).

You can try that on this same form: pressing enter in Subject field will trigger the bold button.

 

Please advise on this.

Thank you.

Laurent.

Valery
Top achievements
Rank 1
Iron
commented on 01 Jun 2021, 11:31 AM

Hi Laurent!
I faced this problem too.
You are right. This happens because the editor buttons don't have the type=button attribute.
I added this code and fixed the problem:

$('button:not([type])', editor.toolbar.element).each(function () {
$(this).prop('type', 'button');
});

2 Answers, 1 is accepted

Sort by
0
Accepted
Valery
Top achievements
Rank 1
Iron
answered on 01 Jun 2021, 11:33 AM

Hi!

I faced this problem too.

This happens because the editor buttons don't have the type="button" attribute.
I added this code and fixed the problem:

    $('button:not([type])', editor.toolbar.element).each(function () {
        $(this).prop('type', 'button');
    });

0
Neli
Telerik team
answered on 31 May 2021, 08:45 AM

Hi Laurent,

Thank you very much for reporting incorrect behavior. I have logged a bug report on your behalf in our official Feedback Portal and below you will find a link to it:

https://feedback.telerik.com/kendo-jquery-ui/1521914-when-the-editor-is-in-a-form-and-the-enter-key-is-pressed-the-first-button-in-the-editor-s-toolbar-is-selected

As a small token of gratitude for reporting a bug, I have increased your Telerik points.

Regards,
Neli
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Editor
Asked by
Laurent
Top achievements
Rank 1
Iron
Answers by
Valery
Top achievements
Rank 1
Iron
Neli
Telerik team
Share this question
or