facebook

Visual HTML Editor possible bug

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #209598 Reply

    Jason Hobbs
    Participant

    –UPDATED–

    I’m seeing an issue where when I use a textarea within a page.
    The editor is inserting gobs and gobs of whitespace/CRs in between the <textarea></textarea> tags. It adds more and more when I use the visual designer, adding anything to the page, until eventually the thing slows down to the point where it’s unusable. (cpu pegged at 100%)

    I didn’t find anything doing a search but has anyone else seen this issue?

    Eclipse 2.1.3 (confirmed on 3.0 also)
    MyEclipse 2.7.101 (confirmed on 3.7.2 also)

    To reproduce:
    ————–
    Make an html file and copy the below contents in in the source view.
    Note the spacing between <textarea> tags. (should be no whitespace)
    Switch to Visual Designer view,
    Place the cursor before the textarea
    Add the text “This is my test” followed by a carriage return.
    Hit the save button.
    Go back to source view
    – You’ll see the space between the <textarea> tags has grown. (one line)
    Go back to Visual Designer view
    Place the cursor before the textarea
    Add the text “This is my test” followed by 4 carriage returns
    Go back to source view
    – You’ll see the space between the <textarea> tags has grown. (more extra lines)
    ——————–

    It’s much more aggressive when copying and pasting HTML either from the same document or from some other document within the Designer view, probably just based on the amount of content you copy / paste.

    The problem can be temporarily fixed by going to source view and removing any whitespace.

    —html below—

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
      <head>
        <meta name="generator" content="HTML Tidy, see www.w3.org">
    
        <title>MyHtml.html</title>
      </head>
    
      <body>
        <p><textarea name="test"></textarea><br>
          </p>
      </body>
    </html>
    
    #209628 Reply

    Scott Anderson
    Participant

    Jason,

    Thanks for reporting this. We’ll look into it and follow up later.

    #209679 Reply

    Greg
    Member

    Jason,

    I have replicated the behavior with the textarea inserting extra whitespace. With the few examples I tested, I haven’t seen the 100% cpu utilization but we have added this report to our PR system and will address it. If you have a html file that you are seeing the 100% cpu utilization on, please send it to support@genuitec.com and reference this thread. Then we can add that file to this report for further testing.

    #209705 Reply

    Jason Hobbs
    Participant

    Well, If you replicate the behavior and copy the whitespace, then paste it many many times (I had many thousands of lines of resulting whitespace in a particular HTML file I’d been messing with for a day or so, copying and pasting tables and content) You’ll see the CPU utilization as you open up the visual designer and try to use it. I could email you a file but you can use the above example with a bunch of carriage returns within the textarea tag to get an idea of what’s happening. about 2000 lines gave me about 20 seconds of 100%cpu time. The time the CPU is pegged for is proportional to the amount of whitespace within the tags.

    I’ve fixed all of my files now but based on the appearance of the scroll bar I’d bet when I personally saw the problem at it’s worst I probably had about 8000 lines of whitespace (when reproducing the issue for CPU utilization, a CR seems to have just about the same effect as X chars of whitespace per line.)

    Try adding 8-10k lines of CRs. It seems extreme but after copying and pasting and moving tables and elements many times – as well as copying the resulting pages and using them as the source for the next page you create… It’s not an unrealistic amount.

    …The CPU utilization issue may just be expected and acceptable with that many lines for the parser to render though, too… That’s not so much my concern as the whitespace getting in there in the first place. Anyone with that much whitespace in an HTML file deserves to die a horrible death anyway.

    #209740 Reply

    Greg
    Member

    The PR has been updated with your latest comments and we appreciate your following up on this topic. The “code freeze” for 3.8beta2 has already come and gone, but this issue should be addressed in 3.8 GA which will be released soon after beta2.

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: Visual HTML Editor possible bug

You must be logged in to post in the forum log in