Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > JQuery no conflict View modes: 
User avatar
Member
Member
lwhittemore-emh - 11/1/2012 2:13:52 PM
   
JQuery no conflict
What does this line of code in the no conflict version of jquery you use do?

 /* CMS */
// Fix for Safari vs. CodeMirror
div = document.createElement("div");
container.appendChild(div);
/* CMS end */


I do not know jquery, but it breaks a menu that I am using. Removing it fixes the menu, but I wonder if it is breaking anything else.

User avatar
Member
Member
kentico_davidb2 - 11/2/2012 6:07:04 AM
   
RE:JQuery no conflict
Hello,

this fix was introduced to address the key binding event model issue in Safari. If it breaks some of your code and you cannot modify it, you can try deleting this fix, but please note that there might be later issues for Safari users when using CodeMirror component for code editing.

The complete fix made by Kentico is:

/* CMS */
// Fix for Safari vs. CodeMirror
div = document.createElement("div");
container.appendChild(div);
/* CMS end */
div.innerHTML = "<div style='width:5px;'></div>";

support.shrinkWrapBlocks = (div.offsetWidth !== 3);
}

/* CMS */
// Fix for Safari vs. CodeMirror
div = document.createElement("div");
container.appendChild(div);
/* CMS end */
div.style.cssText = positionTopLeftWidthHeight + paddingMarginBorderVisibility;
div.innerHTML = html;


Dave