This is a migrated thread and some comments may be shown as answers.

Editor removes checked="checked" from radio button

3 Answers 365 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Russell
Top achievements
Rank 1
Russell asked on 22 Mar 2018, 01:02 AM

After using the View HTML tool the editor removes checked="checked" from a radio button.

Example:

<input name="ID" type="radio" checked="checked" value="1" />

becomes

<input name="ID" type="radio" value="1" />

 

It sort of works if HTML 5 is used.

<input name="ID" type="radio" checked value="1" />

will become

<input name="ID" type="radio" checked="checked" value="1" />

and will stay like that even if you view the HTML multiple times. But the next time the editor is loaded and the HTML is viewed checked="checked" will be removed.

 

it appears to work correctly for check boxes.

3 Answers, 1 is accepted

Sort by
0
Ivan Danchev
Telerik team
answered on 23 Mar 2018, 02:19 PM
Hello Russell,

Here's a dojo example, in which a radio button is placed within an Editor. At my end the checked attribute is not removed when using the viewHtml tool. Could you modify it accordingly in order to demonstrate the behavior you have noticed and list step by step the user actions needed for it to be exhibited? Could you also specify whether this is an issue in a specific browser or it is not browser dependent?

Regards,
Ivan Danchev
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Russell
Top achievements
Rank 1
answered on 26 Mar 2018, 06:46 PM

It does it on IE11 on Windows 7.

In your example it only removed checked="checked" from 1 button but I assume that is because for radio buttons with the same ID only 1 is supposed to have checked="checked".

0
Ivan Danchev
Telerik team
answered on 28 Mar 2018, 10:53 AM
Hello Russell,

Thank you for specifying the browser you noticed this behavior in. It appears to be browser behavior specific to IE reproducible not only with the Kendo UI Editor, but also with an ordinary editable div element.  As you can see in this dojo example, no Kendo UI widgets are loaded and a radio button is nested in a standard editable div element. IE strips the checked attribute, whereas in Firefox and Chrome it is rendered.

Regards,
Ivan Danchev
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Editor
Asked by
Russell
Top achievements
Rank 1
Answers by
Ivan Danchev
Telerik team
Russell
Top achievements
Rank 1
Share this question
or