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

IE11 Image Properties dialog bug

4 Answers 67 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Fit2Page
Top achievements
Rank 2
Iron
Iron
Iron
Fit2Page asked on 18 Dec 2013, 09:43 AM
Hi,

When I select the image in the demo in IE11 and choose image properties the image src and other properties are not filled in the dialog.
Same goes for the ImageMap dialog. See attached screenshot.

This seems like a serious bug to me.
Please investigate ...

Marc

4 Answers, 1 is accepted

Sort by
0
Ianko
Telerik team
answered on 20 Dec 2013, 11:53 AM
Hi Marc,

Thank you for contacting the Telerik support.

The described behavior is already logged in our database for fixing and I can assure you that it is going to be resolved for the next official version of the RadCotnrols.

You can follow this feedback portal item for more information about this matter.

Regards,
Ianko
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
ChrisS
Top achievements
Rank 1
answered on 20 Dec 2013, 11:56 AM

Hi Marc,


I agree that this is a serious bug.  We have already reported this bug to Telerik and after some debate they have agreed to fix for the next release of the RadControls.  The next release is scheduled for mid January I believe.



What is more worrying is that editing an image is not a scenario that they test for.



This was their suggested workaround which may work:



In the meantime I can provide a possible solution by overriding the getParentElement() method in the Selection prototype of the editor, so that it returns the correct value:



<telerik:RadEditor runat="server" ID="RadEditor1">
</telerik:RadEditor>
  
<script type="text/javascript">
    Telerik.Web.UI.Editor.Selection.prototype.getParentElement = function () {
        var rng = this.getRange();
        if (!rng) return null;
  
        //IE
        if (rng.commonAncestorContainer)//MOZ, Safari, Opera
        {
            var theSelection = this._window.getSelection();
  
  
            //Safari!
            var startContainer = rng.startContainer ? rng.startContainer : theSelection.baseNode;
            var endContainer = rng.endContainer ? rng.endContainer : theSelection.extentNode;
            var startOffset = rng.startOffset != null ? rng.startOffset : theSelection.baseOffset;
            var endOffset = rng.endOffset != null ? rng.endOffset : theSelection.extentOffset;
  
            var anchorOffsetChild = theSelection.anchorNode.childNodes[theSelection.anchorOffset];
  
            if (anchorOffsetChild && (anchorOffsetChild.nodeName == "IMG" || (startContainer == endContainer && (endOffset - startOffset) == 1))) {
                return anchorOffsetChild;
            }
            else {
                if ($telerik.isSafari) // new fix context menu in Safari and Chrome
                {
                    var tagName = (theSelection.anchorNode && theSelection.anchorNode.parentNode) ? theSelection.anchorNode.parentNode.tagName : "";
                    if (tagName == "TH" || tagName == "TD") {
                        return theSelection.anchorNode.parentNode;
                    }
                    else if (tagName == "TR") {
                        return theSelection.anchorNode;
                    }
                }
  
                if (!rng.commonAncestorContainer.tagName) {
                    if (this._window.document == rng.commonAncestorContainer && theSelection.baseNode)//SAFARI
                    {
                        return theSelection.baseNode.parentNode;
                    }
                    return rng.commonAncestorContainer.parentNode;
                }
                else {
                    // Workaround for issue related to the retrieved
                    // Image element under IE11
                    if (rng.commonAncestorContainer.firstElementChild
                        && rng.commonAncestorContainer.firstElementChild.tagName === "IMG") {
                        return rng.commonAncestorContainer.firstElementChild
                    }
  
                    return rng.commonAncestorContainer;
                }
            }
        }
        else if (rng.length) {
            return rng.item(0);
        }
        else if (rng.parentElement) {
            return rng.parentElement();
        }
        else {
            return null;
        }
    };
</script>


We have not tried out this solution.  Our solution was to change web.config and force the browser to behave as IE10.



Let me know if the workaround worked.



Alistair



0
Fit2Page
Top achievements
Rank 2
Iron
Iron
Iron
answered on 20 Dec 2013, 12:22 PM
Hi Ianko,

Thanks for your reaction.
We use the Editor in our CMS and I have many pages and controls with Editors on them.

Could you maybe provide an internal build with a solution for this serious bug?

Marc
0
Ianko
Telerik team
answered on 21 Dec 2013, 01:41 PM
Hi Marc,

I suggest checking if the latest internal build that is available in your account, is working for your case. Note that it is not recommended to use such builds for live applications and that possible issues due to them are not officially supported.

If it does not, I regret to inform you that the proper fix will be available in the next major release of RadControls. Also a possible workaround is forcing the IE10 compatibility via meta tag, as suggested by Chris.
<meta http-equiv="X-UA-Compatible" content="IE=10">

Regards,
Ianko
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Editor
Asked by
Fit2Page
Top achievements
Rank 2
Iron
Iron
Iron
Answers by
Ianko
Telerik team
ChrisS
Top achievements
Rank 1
Fit2Page
Top achievements
Rank 2
Iron
Iron
Iron
Share this question
or