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

Problem checking differences between editor value when switching from Chrome to IE11 (alt text on images gets swapped around)

3 Answers 104 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Joran
Top achievements
Rank 1
Joran asked on 03 Dec 2019, 02:29 PM

I am using an editor to save pieces of text in an application. With that editor i have a save and cancel button. When pressing the cancel button it checks for any changes between the editor and the loaded in value (this value is stored in an hidden input, gathered from the database). 

When I insert an image using the ImageBrowserController with the editor, it automatically adds the alt="" text to the image tag. In Chrome this tag is always placed at the end of the image tag, however in IE11 it seems that when using the editor, the tag is placed in the front of the image tag. This causes the two values to not be identical. It means that the loaded value has the alt text on the left but the editor the alt text is on the right of the image tag.

Is this a bug or is there something I can do about this?

 

In summary:

IE11 changes the way the image tag is loaded in the editor compared to Chrome. In Chrome the alt attribute is placed after the source and in IE11 it's placed before the source. When I save a piece of text with an image in Chrome and then open it in IE11 and press Cancel, it detects it as a change, even though I didn't change anything myself.

3 Answers, 1 is accepted

Sort by
0
Veselin Tsvetanov
Telerik team
answered on 06 Dec 2019, 03:25 PM

Hi Joran,

I am afraid that the observed appears to be IE specific issue. That browser automatically moves the position of the alt attribute to be before the src. Here you could find a Dojo sample demonstrating that behavior of the browser:

https://dojo.telerik.com/EqECatop/2

Having that said, I would suggest you to customize your value check to skip the above case.

Regards,
Veselin Tsvetanov
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Joran
Top achievements
Rank 1
answered on 09 Dec 2019, 08:29 AM

Hi Veselin,

Thanks for your response. Quite a bummer that IE handles this differently compared to other browsers.

I'll try your suggestion, thanks.

 

0
Veselin Tsvetanov
Telerik team
answered on 10 Dec 2019, 01:46 PM

Hello Joran,

Yes, that is really unexpected. The browser actually alters the HTML content, which, normally, should not happen.

Regards,
Veselin Tsvetanov
Progress Telerik

Get quickly onboarded and successful with Telerik UI for ASP.NET Core with the dedicated Virtual Classroom technical training, available to all active customers.
Tags
Editor
Asked by
Joran
Top achievements
Rank 1
Answers by
Veselin Tsvetanov
Telerik team
Joran
Top achievements
Rank 1
Share this question
or