Iam using context Menu in my Map.when i right click on map it is showing Context menu its working fine in IE and Google crome.when i use Mozills it is showing context menu in some where how to resolve this issue.
Context menu is not showing in correct position
Hi Rajankanth,
Can you send us a demo or the screenshot that you got on your end to us?
Thanks,
Johnny
Here iam attaching a screen shot for this issue.actually i just right click on map on red square indication for ur reference.then context menu is showing in some where left u can see on image.but its working fine IE and google crome only mozilla iam facing this problem.please give a quick solution for this one
Hi,
Please try the workaround below to fix the issue:
OnMapCreating = function (map) {
Class.Extent(ContextMenu.prototype, {
initialize: function (json, lonlat, target, mapUniqueId, mapClientId) {
this.id = json.id;
this.lonlat = lonlat;
this.target = target;
this.mapUniqueId = mapUniqueId;
this.mapClientId = mapClientId;
this.div = NewDomNode('DIV');
this.div.id = this.id;
if (CheckCssName(json.css)) {
this.div.className = json.css;
} else {
this.setDefaultStyle();
}
this.div.style.position = 'relative';
this.div.style.width = json.w == 0 ? '100px' : (json.w + 'px');
this.div.style.zIndex = 100000;
this.div.style.display = 'none';
this.div.oncontextmenu = function () { return false; };
},
moveTo: function (x, y) {
var screenWidth = parseInt(document.body.clientWidth);
var screenHeight = parseInt(document.body.clientHeight);
var ctxWidth = parseInt(this.div.style.width);
if (x + ctxWidth > screenWidth) {
x -= ctxWidth;
}
var ctxHeight = this.div.children.length * 20;
if (y + ctxHeight > screenHeight) {
y -= ctxHeight;
}
this.div.style.left = x + 'px';
this.div.style.top = y + 'px';
}
})
}
Thanks,
Johnny
if i use script then sub menus of context Menu are not displaying on the map.any changes need to be done in this script
Hi Raja,
It’s proved to be a bug in WebEdition, it have been fixed it in the latest “Production” version 6.0.0.311 or later and “Development” version 6.0.311.0 or later, please download that version from CRM and have a try.
NOTE: afeter applying the fixed version .DLLs, please make sure remove the script workaround i mentioned eariler.
Thanks,
Johnny
If i use 6.0.0.311 verson dlls iam getting this same issue in all browsers it is showing context menu in some where.even in IE and google crome also iam getting this same error
Hi rajanikanth,
Please make sure you have cleared all the caches of the tested browsers, including all the items except "Passwords" at first, and then have a try again. We just did a simple test with attached sample and "6.0.0.311" on all browsers Chrome, IE9,Firefox and Safari, but everything works fine. If it still runs into problem, please try attached demo we used for test to check if it works for you, if not, can you do some changes to reproduce the problem and send it to us back?
Thanks,
Johnny
AddAContextMenu.zip (1.94 KB)