FMICIT - 2014-10-17

Could this bug be occurring because in the function prepareForCaret you are passing onclick, onkeyup, onselect to the function observeEvent and the observeEvent is concactinating "on" in front of the eventName so the eventName now is ononclick, ononkeyp, ononselect? All other uses of observeEvent do not pass "on" in front of the event.

function prepareForCaret(object){object=getObject(object);if(object==null||!object.type){return null}
if(object.createTextRange){var handler=function(){object.caret=document.selection.createRange().duplicate()}
observeEvent(object,"onclick",handler);observeEvent(object,"ondblclick",handler);observeEvent(object,"onselect",handler);observeEvent(object,"onkeyup",handler)}}

function observeEvent(object,eventName,handler){object=getObject(object);if(object!=null){if(object.addEventListener){object.addEventListener(eventName,function(e){return invokeAsMethod(object,handler,[e])},false)} else if(object.attachEvent){object.attachEvent("on"+eventName,function(){return invokeAsMethod(object,handler,[window.event])})} else {object["on"+eventName]=handler}}}