• Rails Application and SSL Problem in Internet Explorer

    Recently we ran across a very annoying problem when deploying a Ruby on Rails application running under SSL when viewed in IE7. When we loaded the page in Internet Explorer 7 there was a content security error. This made no sense at all as everything was secure, and even when we hard coded absolute links the problem still persisted. What could possibly be causing this problem.

    Thinking perhaps it was some random HTTP link sitting in the code, the developers went over everything with a fine tooth comb and could not find the problem. Knowing that a secure content error could be the result of a number of things we broke parts out of the page and rebuilt the page one line at a time until we recreated the content error. Low and behold we found a single JS file that was causing this problem!






    The offending JS file was called autotab.js and it only contains the following code:

    Event.addBehavior({ ‘input.autotab:keyup’ : function(e) { if(e.keyCode != 9 && e.keyCode != 16) { if(e.target.value.length == e.target.size) { e.target.next().focus(); } } }
    });

    As I understand it, all this code does is automatically tab to the next field when the current form field is filled. Why would this cause an SSL security exception in Internet Explorer 7? Just another reason to switch to a non microsoft based browser. Firefox, Chrome and Safari did not have this issue.

    Share

    Leave a reply