Context menu broken
Posted:
Mon Feb 05, 2007 5:14 pm
by FickD
I've noticed that the context menu won't display more than 1 level even though it's been clearly defined in the menuModel that there should be 2 options under the Save As ( PDF and RTF ) aren't displayed in the demo, no sub menu's are displayed.
Daniel
Posted:
Fri Mar 02, 2007 7:12 pm
by EZboy
OK, i looked it to that,
there is an error adding contextmenu item:
it should be
menuModel2.addItem(1,'Save','images/disk.gif','',false,'','saveItem');
instead of
menuModel.addItem(1,'Save','../images/disk.gif','',false,'saveItem');
The second thing is there is a problem in js code approx. here:
if(this.menuItems[no].jsFunction){
this.menuItems[no].url = this.menuItems[no].jsFunction + '(this,referenceToDHTMLSuiteContextMenu.srcElement)';
}
It looks like "this.menuItems[ ].url" takes value of last added item for al the items:?
Posted:
Fri Mar 02, 2007 7:22 pm
by EZboy
Another thing!!!
Lets say i have context model attached to the div element with internal structure:
<div> <img> <span> text </span> </div>
When i click on this block, a js error occurs here - ref.srcElement=DHTMLSuite.commonObj.getSrcElement(e)
Understandable, the div was hooked up to context model, but the span/img triggered the event. How to avoid this?