#1107 bug

IE8 Fatal Crash when Prototype.js is loaded with rounded-corners.htc

Reported by deborah | August 2nd, 2010 @ 11:55 PM | in 1.7

Hi - our website uses a popular and elegant rounded corner solution (http://www.htmlremix.com/css/curved-corner-border-radius-cross-brow...) in order to style rounded corners for IE8. When used with prototype.js, as the page loads, the two files together cause a fatal conflict and IE8 immediately crashes.

Both of these solutions are popular and I hate to abandon either one. Is there any way you can take a look and resolve the conflict? I can alter the htc or prototype if you can tell me how - it would help if I could do so as quickly as possible, as you may imagine.

Thank you Prototype! I am attaching the htc (which I renamed).

Comments and changes to this ticket

  • Erin Cunningham

    Erin Cunningham August 6th, 2010 @ 03:51 PM

    I'm also experiencing the same problem with PIE.htc . It works flawlessly in IE7 but when applied to the same site (using both Prototype 1.6.1 and 1.7rc2) it crashes. I'm on the verge of launching a new site and would like to use both solutions but may have to abandon them if they can not play nice.

    Thank you for taking a look at this bug.

  • gonchuki

    gonchuki August 9th, 2010 @ 09:51 PM

    Can you provide info on what OS you are using?
    So far I confirmed this issue with other .htc solutions and JS libraries but I was only able to reproduce it while using WinXP. Seems that Win7 is immune to the crash.

  • Erin Cunningham

    Erin Cunningham August 9th, 2010 @ 09:54 PM

    I'm seeing this behavior in IE8 on WindowsXP Pro. I do not run into the crash problem with IE7.

  • deborah

    deborah August 9th, 2010 @ 10:46 PM

    Yes, it is Windows XP Pro version 5.1.2600. Crash, crash, crash. If it is possible and easier to alter the .htc, let me know how, and I'll both do it and post an update to the site where it came from. I'm not sure anything could be more disheartening than to replace elegant, beautiful curvy corner divs with hacky, ugly tables. Thank you so much for looking into this, Prototype!

  • Andrew Dupont

    Andrew Dupont August 11th, 2010 @ 08:23 AM

    • Importance changed from “” to “Low”

    Annoyingly, HTCs are voodoo. Off the top of my head, I have one diagnostic suggestion: try replacing oncontentready with ondocumentready like so:

    <public:attach event="ondocumentready" onevent="oncontentready('v08vnSVo78t4JfjH')" />

    This will make it so that the behavior gets applied for each element not as soon as the element itself is ready, but after the whole document has loaded. If that prevents the crash, it's a good hint on where the problem lies.

  • deborah

    deborah August 11th, 2010 @ 09:00 PM

    Hello excellent Prototype people,

    Andrew's suggestion didn't prevent the crash. Thank you so much for taking a look at this - you are all the BEST !

    I appreciate the designation of voodoo for htc and I am now giving up and using gross, hacky tables. If it is ever solved accidentally, please comment the ticket so I can get the comment?

    Thank you very much for all of your good effort and response. :)

  • John-David Dalton

    John-David Dalton August 11th, 2010 @ 09:16 PM

    If this only crashes in IE8, and not IE6/7, then it could be related to how PrototypeJS extends DOM object prototypes. Have you tried this with MooTools by chance? They don't extend DOM object prototypes, even in IE8.

    You can stop PrototypeJS from extending DOM object prototypes in IE8 by changing line 35 in its source from

    34|    SpecificElementExtensions: (function() {
    35|      if (typeof window.HTMLDivElement !== 'undefined')


    34|    SpecificElementExtensions: (function() {
    35|      if (typeof window.HTMLElement != 'undefined' && typeof window.HTMLDivElement != 'undefined')
  • deborah

    deborah August 11th, 2010 @ 11:19 PM

    Just tried John-David Dalton's solution, but the crash persisted (I am deleting all cached files and restarting IE8 for each test). I haven't tried it with MooTools - the conflict is actually with a lightbox product (Lightview) that depends on Prototype. Besides, I really like Prototype. Thank you and alas!

  • John-David Dalton
  • gonchuki

    gonchuki August 11th, 2010 @ 11:39 PM

    From personal experience: MooTools 1.2.4 does not crash, but the WIP MooTools 1.3 does. I'm actively looking for the source of this problem and I'll be cross contributing on both projects if I get a solution (or at least find the root issue).

    All I know for know is that it definitely has something to do with extending native objects prototypes, it just seems that the crashy IE8 is sensitive to certain instructions.

  • John-David Dalton

    John-David Dalton August 11th, 2010 @ 11:58 PM

    Yep that seems to suggest DOM object prototype extensions as the cause of the problem.
    MooTools 1.3x has started extending DOM object prototypes.

  • Andrew Dupont

    Andrew Dupont August 15th, 2010 @ 02:07 AM

    • Milestone set to 1.7
    • State changed from “new” to “bug”
    • Assigned user set to “Andrew Dupont”

    Here's PIE's ticket for the issue. It seems like it affects all HTCs.

    Here's a StackOverflow question on the subject. It suggests that this wasn't a problem before 1.6.1, which makes sense, because the SpecificElementExtensions test in 1.6.0.x wouldn't pass in IE8.

    Deborah, to take JDD's suggested workaround further, try changing:

    SpecificElementExtensions: (function() {
      // First, try the named class
      if (typeof window.HTMLDivElement !== 'undefined')
        return true;
      var div = document.createElement('div'),
          form = document.createElement('form'),
          isSupported = false;
      if (div['__proto__'] && (div['__proto__'] !== form['__proto__'])) {
        isSupported = true;
      div = form = null;
      return isSupported;


    SpecificElementExtensions: false

    This isn't meant to be a workaround; it's just meant to see if that capability check itself is causing the crash (and, if so, whether bypassing that check only in IE8 would be a feasible workaround).

    When I'm in front of a PC again, I'll try to make a test page for this.

  • deborah

    deborah August 16th, 2010 @ 08:05 PM

    Hi Andrew,

    I tried this - replaced pretty much the function from "SpecificElementExtensions:..." to "...return isSupported; })()" with "SpecificElementExtensions: false". (Let me know if this is not what was intended.)

    The crash was still immediate. Just to make sure nothing was cached, I cleared the IE8 cache, restarted, and reloaded the page with Prototype commented out (no crash). Then I put it back in and referenced a new filename - crash.

    This seems to be one sticky problem. Thank you so much for this help.

  • Dmitriy

    Dmitriy November 24th, 2010 @ 05:11 AM

    16 nowember 2010 release prototype-1.7, but bug not fix.. why?? what's the problem?

    IE8 still will long live. But also css3 it is necessary to use too.

  • Andrew Dupont

    Andrew Dupont January 29th, 2011 @ 12:47 AM

    So this recent StackOverflow comment explains the problem. I have no way of knowing whether this is true, but it sounds convincing; I've not been able to reproduce this, even using PIE's test case, so if this has been fixed with a Windows update it would explain why.

    The suggested fix appears sound. It's ugly — it requires modifying the Prototype source code — but if I understand the flaw correctly, there's no way around that.

  • Andrew Dupont

    Andrew Dupont January 29th, 2011 @ 05:09 AM

    OK, now I'm able to reproduce the issue. From the small amount of testing I've done, it's doubtful I'll find a less complicated workaround than the one mentioned above.

    The author of PIE points out there's now a JavaScript version that trades some of the hassles of HTCs for a completely different set of hassles. It fixes this crash.

  • John-David Dalton

    John-David Dalton January 29th, 2011 @ 07:40 AM

    I cooked up some tests a while back to check for this bug. This bug is why the final build of MooTools 1.3 no longer extends Element prototypes in IE.

  • Chris Candreva

    Chris Candreva February 22nd, 2011 @ 03:12 AM

    I'm wondering if anyone has checked this since Jan 29. I was just warned about this problem, however I've just run tests and IE 8 doesn't crash for me.

    I've tried my own code, and the test case links John-David Dalton posted above, and I've had no crashes.

    This is with IE 8.0.6001.18702 both 32 and 64 bit.

    Neither Prototype 1.6.1 or 1.7 crashes, so I'm wondering if Microsoft could have patched the problem ?

  • Andrew Dupont

    Andrew Dupont February 22nd, 2011 @ 11:37 PM

    I'm able to reproduce the issue with 8.0.6001.18702. Try this testcase.

  • Jason Westbrook
  • leilei3915
  • ramesh hoole
  • kenkoiii

    kenkoiii November 6th, 2018 @ 10:56 AM

    An amazing and excellent post, loved it! bouncing balls, red ball

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

The Prototype JavaScript library.

Shared Ticket Bins


Referenced by