WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 3 years ago

#12509 closed defect (bug) (invalid)

TinyMCE Visual Editor moves </div> tag upwards

Reported by: jamescollins Owned by: azaozz
Milestone: Priority: normal
Severity: normal Version: 2.9.2
Component: TinyMCE Keywords: close
Focuses: Cc:

Description

We have noticed a strange problem with the visual editor in IE6 and IE7. IE8, Firefox 3.5, and Safari 4.x don't have the same problem.

  1. Using IE6 or IE7, create a new page in WordPress.
  1. Switch to the HTML editor.
  1. Paste in the following page text:
<div>
<img src="blah.jpg" />
<h2>Heading</h2>
text
</div>
rest of page
  1. Switch back to the Visual editor.
  1. Switch back to the HTML editor. The text is now:
    <div><img src="blah.jpg" alt="" /></div>
    <h2>Heading</h2>
    text
    
    rest of page
    

Notice how the closing </div> tag has been moved up above the "text" and <h2> code?

On the other hand, using this code (same as above, but without the <h2> code):

<div>
<img src="blah.jpg" />
text
</div>
rest of page

produces:

<div><img src="blah.jpg" alt="" />
text</div>
rest of page
<div>
<img src="blah.jpg" />
text 1
text 2
</div>
rest of page

ie it doesn't move the </div> tag. Similarly,

<div>
<img src="blah.jpg" />
text 1
text 2
</div>
rest of page

produces:

<div><img src="blah.jpg" alt="" />
text 1
text 2</div>
rest of page

doesn't move the </div> tag either.

I have been able to replicate this on WordPress 2.9.2, WPMU 2.9.2.

It is also still a problem on the latest trunk version (r13580).

I couldn't find any existing bug reports for this, but I did find some similar older bugs:
#6610
#3492
#7345

This is causing a lot of trouble with our clients, who mostly use Internet Explorer. When they edit the pages that we have created for them using the HTML editor, our custom divs get moved around.

Thanks

Change History (5)

comment:1 jamescollins4 years ago

Also, when I say IE7, I mean we were using IE8 with compatibility mode turned on.

We only have IE6 and IE8 test installs.

comment:2 Denis-de-Bernardy4 years ago

  • Keywords ie6 ie7 tinymce removed
  • Summary changed from TinyMCE Visual Editor moves </div> tag upwards in Internet Explorer 6 and 7 to TinyMCE Visual Editor moves </div> tag upwards

this is a dup of the other block-related autop bugs. your browser has nothing to do with it.

comment:3 jamescollins4 years ago

My understanding is autop is what is adding/removing the blank lines. That isn't a problem.

However if you look at my first example, the closing </div> tag is incorrectly being moved up above the heading and text by the visual editor. This shouldn't happen, and I'm not sure what is causing it.

These changes are being made just by switching to the visual editor and back to HTML. It has nothing to do with the actual saving of the page text.

comment:4 solarissmoke3 years ago

  • Keywords close added

Wordpress no longer supports IE6, and it nags about IE7. On that basis I'm inclined to suggest closing this.

comment:5 dd323 years ago

  • Milestone Future Release deleted
  • Resolution set to invalid
  • Status changed from new to closed

I just tested this in IE7 (via ieTester) and didn't see a problem, this might've been solved via another patch in the last 15 months, or, IE7 never had the problem.

Based on the fact the WordPress admin no longer supports IE6, I'm agreeing with solarissmoke and closing this.

Note: See TracTickets for help on using tickets.