Telerik RadEditor Image Manager Window Not Displaying Properly

233 Views Asked by At

I am using the Telerik RadEditor and am seeing some strange behavior with the Image Manager window, shown below.

Image Manager Issue

The tabs such as SiteCopy, Body Setup, Header Setup, etc. are all from the page that should be behind the window, yet they are somehow showing through. Clicking and dragging the window to another location on the screen fixes that issue, however, the window cannot be closed using either the X or Cancel. This only seems to happen in Chrome when I am zoomed in a bit on the page. Is this a bug with the Image Manager or is there something that can be done to prevent this behavior?

Thanks

1

There are 1 best solutions below

0
On

Try the ideas from this thread: http://www.telerik.com/community/forums/button-click-fails-(sometimes) Chrome 39 broke the internet again because it started returning decimal values for properties that used to be integers, which can cause script errors.

Try the following:

  1. use a RadScriptManager on the main page

  2. The script override from the thread abocve could be the solution you are looking for:

    if (document.documentElement.getBoundingClientRect) {
        $telerik.originalGetLocation = function (element) {
            var e = Function._validateParams(arguments, [
                { name: "element", domElement: true }
            ]);
            if (e) throw e;
            if (element.self || element.nodeType === 9 ||
                (element === document.documentElement) ||
                (element.parentNode === element.ownerDocument.documentElement)) {
                return new Sys.UI.Point(0, 0);
            }
    
            var clientRect = element.getBoundingClientRect();
            if (!clientRect) {
                return new Sys.UI.Point(0, 0);
            }
            var documentElement = element.ownerDocument.documentElement,
                offsetX = Math.round(clientRect.left) + documentElement.scrollLeft,
                offsetY = Math.round(clientRect.top) + documentElement.scrollTop;
            if (Sys.Browser.agent === Sys.Browser.InternetExplorer) {
                try {
                    var f = element.ownerDocument.parentWindow.frameElement || null;
                    if (f) {
                        var offset = (f.frameBorder === "0" || f.frameBorder === "no") ? 2 : 0;
                        offsetX += offset;
                        offsetY += offset;
                    }
                }
                catch (ex) {
                }
                if (Sys.Browser.version === 7 && !document.documentMode) {
                    var body = document.body,
                        rect = body.getBoundingClientRect(),
                        zoom = (rect.right - rect.left) / body.clientWidth;
                    zoom = Math.round(zoom * 100);
                    zoom = (zoom - zoom % 5) / 100;
                    if (!isNaN(zoom) && (zoom !== 1)) {
                        offsetX = Math.round(offsetX / zoom);
                        offsetY = Math.round(offsetY / zoom);
                    }
                }
                if ((document.documentMode || 0) < 8) {
                    offsetX -= documentElement.clientLeft;
                    offsetY -= documentElement.clientTop;
                }
            }
            offsetX = Math.round(offsetX);
            offsetY = Math.round(offsetY);
            return new Sys.UI.Point(offsetX, offsetY);
        };
    

    }