Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    RichTextEditor crashes browser

    I have a form that works fine until I add a RichTextItem. It has different effects in different browsers but none of them like it much. On the mac it causes Firefox to hang and in Safari it appears to work but always returns a value of null for the edited text. On Windows it causes both Firefox and IE to hang. The ones that hang do so when the form is first displayed, before any record is selected for editing in the form. If I remove the RichTextItem all work fine. The code is quite simple.

    RichTextItem description = new RichTextItem("DESCRIPTION");
    description.setHeight(200);

    And then I include it in the list of fields on form.setFields().

    Any known issues? Is there an alternative editor that plays well with SmartGWT?

    #2
    The RichTextEditor in showcase works fine in all of my browsers so I know it must be something to do with my environment, but what? I'm using SmartGWT EE 2.0. What should I be looking at to try to debug the problem. Nothing shows up in the dev console or server log. I tried compiling Showcase from the SmartGWT EE 2.0 distribution but then realized that it does not include a RichTextEditor sample. What else should I look for?

    Comment


      #3
      If Firebug I see that Firefox is getting hung up on this line of code in ISC_Core.js.

      this.getHandle is not a function
      try{this.getHandle().name;true}catch(e){false}

      If I let it continue it works for a while but eventually runs into other errors. Does that provide a clue?

      Comment


        #4
        Hi Jay,

        You continue to post the impossible. One day we will find out that you are in an array bathed by heavy gamma radiation and this will explain all the things that only happen for you.

        At best, this seems to indicate either that third-party JavaScript code wiped out the HTML that was created by the SmartGWT component, or that there are unusual security settings preventing IFrames from being created at all (required for rich text editing in some browsers).

        If you search the forums for "FCKEditor" you'll find some complete code samples of embedding this editor into SmartClient. However the problem you've get here is inexplicable so there's no way to guarantee that FCKEditor will work for you either.

        Comment


          #5
          Trust me, no one wants to solve these mysterious problems more than me. I don't like feeling so "special". I don't have any 3rd party javascript and haven't changed any security settings from their default. I've tried removing everything from the form except the RichTextItem thinking there may be some conflict, but that makes no difference.

          Is there anything I can do to try to get to the root of the problem? I'd be happy to zip up my entire project and send it to you if that would help.

          If I have Firebug open and click "continue" when the error first appears it continues to work without issue. I can use the editor, save the results and everything is good. If I could trace back to the source of the error it might be clear what the problem is, but how do I do that? I'm not very experienced at debugging javascript.
          Last edited by jay.l.fisher; 6 Jan 2010, 13:43.

          Comment


            #6
            Re: the ongoing mysterious problems: have a Faraday cage handy? Kidding. Kinda.

            The problem is, you've sent us complete settings before and we've matched environments down to the operating system and gotten "works for me" results. Since in each case the Showcase has worked but your seemingly identical environments haven't, it's become rational to entertain possibilities like slowly failing disks that are corrupting your files.

            On the behavior you're now seeing - the only new aspect to this is that it somewhat suggests a timing rather than a security issue. Are you running HTTPS? Are you using non-default cache settings in your browser?

            Comment


              #7
              Think I can find a Faraday cage on eBay?

              I'm not running HTTPS and haven't changed any browser cache settings. I can however reproduce the error and catch it with Firebug. If I ignore the error and continue it works fine. The error appears once when the canvas is first drawn. When the form gets populated and I submit it for update the error happens again, twice. And if I continue to ignore it in Firebug everything continues to work fine. The data I'm submitting gets persisted, including the RichText component's value (which I now think has nothing to do with the problem).

              If there was some way to trace the stack back to find the code that is causing the error a lightbulb might go off. I can look at the Firebug stack window (attached) but it doesn't mean much to me. Is there any debug info I can send you that would help point to the source of the problem?
              Attached Files
              Last edited by jay.l.fisher; 6 Jan 2010, 15:31.

              Comment


                #8
                More clues to add. If I remove the RichTextItem the error does not happen when the canvas is first drawn. It does still happen when the form gets populated and I submit it for update, and still twice. I'm discounting the failing disk theory since I've had absolutely no other problems with the machine I'm running this on AND it happens on an entirely different machine with a different browser. I'm sure it is something bone-headed that I'm doing, and once I figure out what it is I promise I'll never do it again, but what the heck is it? Debugging in this environment is exceptionally difficult.
                Last edited by jay.l.fisher; 6 Jan 2010, 17:33.

                Comment


                  #9
                  Whatever caused the original problem is now gone. The "bug" that Firebug is reporting still exists, but if I turn off Firebug it is as if it doesn't exist, which at this point is good enough for me. If I have to use Firebug to debug anything else in the app I just have to remember to ignore this particular error. It seems to me it must be some sort of error that SmartClient isn't catching and handling but that has no other bad side effects in this particular scenario so I'll wait to see if any other mysterious problems crop up.

                  Comment

                  Working...
                  X