2

Resolved

Context menu - javascript error

description

I'm trying to get the context menu to work, but I'm getting an error.
<!--StartFragment--> Uncaught TypeError: Cannot call method 'offset' of undefined - <!--StartFragment-->

jquery.contextMenu.js:27
<!--EndFragment--><!--EndFragment--> I know my way around Javascript and I can see what's going on, but I don't know why. It's enough to drive anyone crazy.



Looking at at line 53, I can see that it caches the dimensions.

When the dimensions are read at line 28, they are just fine.

But line 27 throws an error. Why? It can't read $ul.data('$parentliref')

For some reason, this object will not cache in the browser. I tested this in multiple browsers.



Is there a conflict with a specific version of jQuery? Any other ideas?

Worst case scenario, I can tool my way around the source code to implement a different context menu provider (instead of the dynamic drive.) I did this with the old version, but I don't want to fork my own version breaking changes.

file attachments

comments

tha_watcha wrote Apr 23, 2011 at 8:31 AM

I attached an updated Version with the Script you use, i updated the script no its support positioning correcting if not enough horizontal/vertical room to the ridge of the cursor

lucasjans wrote Apr 23, 2011 at 4:57 PM

I'm getting a very basic, strange error: Uncaught TypeError: Object #<Object> has no method 'vscontext'

on
jQuery('#dnn_ctr19315_ModuleContent').vscontext({menuBlock: '#dnn_ctr19315_dnnMODULEACTIONSMENU'})

It's almost like it's not instantiating the context menu. Could be a load order or timing issue. I'll investigate further.

tha_watcha wrote Apr 23, 2011 at 5:25 PM

Looks like the Browser have cached the Js File reload the file directlly in the Browser tab then it should reload it.

lucasjans wrote Apr 23, 2011 at 6:38 PM

Good call, cache issue. Couple things I noticed...

One, some extra spacing on the CSS.
http://cl.ly/2W083b1O0R1a1x230L3k

Two, the placement of the "Move" menu varies in different browsers.

tha_watcha wrote Apr 24, 2011 at 6:30 AM

The Link didnt work, please attach the screenshot here.

The Menu + the Move submenu positioning based on the current position, that means if not enough space to show the menu it adjust its positioning automatically.

But i tweaked the script, now it should work properly

tha_watcha wrote Apr 24, 2011 at 7:50 AM

I attached beta2 now hopefully everything is sorted out

lucasjans wrote Apr 25, 2011 at 3:09 AM

Try again, that image loads for me.

tha_watcha wrote Apr 25, 2011 at 11:30 AM

Image still doesnt load for me, no browser works

i always get

Application Error
An error occurred in the application and your page could not be served. Please try again in a few moments.

If you are the application owner, check your logs for details.

Please attach the file. Which of the skins did you use? or did you use a custom one? I also updated the css files, maybe there where also cached

tha_watcha wrote Apr 27, 2011 at 12:27 PM

finally i was able to see the screenshot i attached it.

I think this should not appear with the latest css files included in beta2 also the z-index issue i fixed in that beta.

christoc wrote May 12, 2011 at 5:58 AM

I'm getting the following error when trying to use Beta2 against 5.4.4

Index or size is negative or greater than the allowed amount" code: "1
[Break On This Error] {if(ctl.parentNode.childNodes[i+offset]!=null) out of dnn.js line 176


This causes the actions menu to not display. If I set includejs to false it displays, but I am having an issue with the menu not displaying fully if the pane is very short

christoc wrote May 13, 2011 at 2:59 AM

I tracked my overflow issue down to one of my wrapper classes in my CSS for my skin. http://multifunction.codeplex.com which will hopefully have a "release" here soon.

tha_watcha wrote May 13, 2011 at 10:43 AM

where you also able to fix this? If not i take a look at it.

christoc wrote May 13, 2011 at 4:17 PM

I ended up leaving the JS stuff out of my container to avoid the error

tha_watcha wrote May 14, 2011 at 7:59 AM

i tested the menu with your skin, besides th skin is a bit messed up when in edit mode the context menu works for me in dnn 5.6.2