Firefox Backspace Bug?

  •  07-02-2009, 9:58 AM

    Firefox Backspace Bug?

    Hi,
     
    I'm using version 6.1
     
    We've got the CuteEditor set up on a deployment server (so I can't link to it here) and we're testing it for multiple users with multiple pages each, all set up programmatically. When the CE loads, i'm using the Javascript API and Ajax to load any existing content from XML files, if it exists. All of this works fine.
     
    What's odd is that when the XML files do exist, and thus content is loaded into the CE via the javascript, the backspace/delete keys will not remove content until soemthing new is typed.  This only happens in FireFox - I've been able to test both 3.0 and 3.5,  both are affected, but I do not get this bug in IE7 or 8.
     
     The code I'm using to generate the CuteEditor
    <% set editor = New CuteEditor
    editor.ID = cStr(request.QueryString("PageName"))
    editor.AutoConfigure = "Full_noform"
    editor.ContextMenuMode = "Compact"
    editor.FilesPath = "/Dashboard/CuteEditor_Files"
    editor.ImageGalleryPath = "/Dashboard/sbtmp/" & path & "/uploads/"
    editor.MediaGalleryPath = "/Dashboard/sbtmp/" & path & "/uploads/"
    editor.FlashGalleryPath = "/Dashboard/sbtmp/" & path & "/uploads/"
    editor.FilesGalleryPath = "/Dashboard/sbtmp/" & path & "/uploads/"
    editor.EditorBodyStyle = "font: 13px Verdana;"
    editor.Height = 500
    editor.Width = 940
    editor.Draw() %>
    I set up the file paths to that users upload area, set the ID to the name of their page they are working on, and some basic functionality - height, width, default font, menus. Nothing special here.

    For my javascript (this is just a snippet), I'm checking to see if the XML file exists, if so, I pull the contents and assign them to a global variable, and if the contents are not null, i assign a timer to load the global variable into the CE. Again, the contents load fine.

    html = XML.getElementsByTagName("content")[0].childNodes[0].nodeValue
    ...
    var pageName = document.getElementById("PageName").value; editor = document.getElementById("CE_" + pageName + "_ID"); window.setTimeout(AddContent,1000);
    function AddContent() {editor.SetHTML(html);}

    I've tried using some of the default demos on your site, but I am unable to replicate the problem. I've tried both with the JavaScript API demo (http://cutesoft.net/asp/JavaScript-API.asp) as well as the default configuration demo (http://cutesoft.net/asp/EnableAll.asp).

     
    Any idea why content loaded in such a manner cannot be deleted/backspaced until new content is added? I can put the cursor anywhere in the CE - i can copy and paste, i can type new content just fine.
     
    But until I add new content - whether via typing or pasting, I cannot:
    delete  (keyboard , right-click and use the built-in menu)
    backspace - keyboard
    cut (ctrl X on keyboard, the  built in right-click menu, or the icon in the toolbar)
    This is true in HTML or normal view.
     
    But once i type anything - even simply hitting the space bar - this all works fine.
View Complete Thread