Menu ▾ ▴

#8 JavaScripTools InputMask 2.2.5 isn't working in IE8

Next
open
None
5
2014-10-17
2014-10-16
FMICIT
No

We are using a phone number mask. For IE8, it worked in the previous version but not in 2.2.5. The user cannot type anything into the field.

new InputMask("(###) ###-####", "Phone")

Discussion

  • FMICIT

    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}}}

     

Log in to post a comment.