JS Exception: Component returned error code: 0xc1f30001 (Gecko Implementation only)

  •  01-30-2008, 7:43 AM

    JS Exception: Component returned error code: 0xc1f30001 (Gecko Implementation only)

    I am running Cute Editor inside of a hidden div (Similar to your demo except that I wait 3 seconds for it to finish initializing and then use ce.setHTML to add some text). Most of the time the Editor runs great but in certain circumstances I receive the following Javascript exception:
     
    Command 'selectall' Error : Component returned failure code: 0xc1f30001
    (NS_ERROR_NOT_INITIALIZED) [nsIDOMNSHTMLDocument.execCommand]
     
    I assume because there are a bunch of places in the gecko implementation script file marked:
    //TODO: event not found? throw error
     
    One way to trigger this is to show the div, quickly hide it before the Editor is fully initialized and then show it again.
     
    This exception also appears to be thrown more often on pages that use a lot of Javascript. The exception is not thrown on your Demo page but if you quickly show, hide and then show again without giving it time to fully initialize it does mess up the editor.
     
    This is a web app with a large user base so this is a major problem for us. I have optimized all of the gifs which improves load time quite a lot but this appears to be some issue with the initialization script.
     
    Do you have any suggestions?

View Complete Thread