Make WordPress Core

Opened 15 years ago

Closed 14 years ago

#14270 closed defect (bug) (fixed)

HTML->Visual editor issues in Webkit browsers

Reported by: arlen22's profile Arlen22 Owned by:
Milestone: 3.1 Priority: normal
Severity: normal Version: 3.0
Component: Editor Keywords: reporter-feedback
Focuses: Cc:

Description

Using WordPress' Editor, if I enter this in HTML mode:

<ul>
<li><a name="link" href="example.php">First example</a></li>
<li><a name="link" href="example.php">Second example</a></li>
<li><a name="link" href="example.php">Third example</a></li>
</ul>

Then switch to the Visual mode and back, it shows this:

<ul>

<li><a name="link"></a></li>
<li><a name="link"></a></li>
<li><a name="link"></a></li>

</ul>

Change History (17)

#1 @azaozz
15 years ago

  • Keywords reporter-feedback added; visual editor removed

Cannot reproduce this. Pasting this in the HTML editor:

<ul>
<li><a name="link" href="example.php">First example</a></li>
<li><a name="link" href="example.php">Second example</a></li>
<li><a name="link" href="example.php">Third example</a></li>
</ul>

then switching to Visual and back produces this:

<ul>
	<li><a name="link" href="example.php">First example</a></li>
	<li><a name="link" href="example.php">Second example</a></li>
	<li><a name="link" href="example.php">Third example</a></li>
</ul>

(only difference is the indentation).

Please disable any plugins that may be affect this and try again.

#2 @scribu
15 years ago

  • Summary changed from Visual Editor to HTML code dissapears when switching to visual editor

#3 follow-up: @Arlen22
15 years ago

Reinstall your test blog, I just did that and it didn't change.

#4 in reply to: ↑ 3 @nacin
15 years ago

Replying to Arlen22:

Reinstall your test blog, I just did that and it didn't change.

Instead of "Reinstall your test blog," azaozz is *the* authority here, so offer some more steps to reproduce or environment information. Browser, version, OS?

#5 @Arlen22
15 years ago

And, no, no plugins enabled. Tested on 2 separate hosting provider (one is a private one on my network). Just copy it in, switch to visual and back and it should duplicate. It doesn't do it in Firefox, just Chrome. I changed the subject to reflect this. Tested it now. In Firefox, the anchor icon is still there, with the text after it. In IE, it only shows the anchor in Visual (doesn't show the text), but the HTML does not change.

#6 @nacin
15 years ago

  • Keywords reporter-feedback removed

Reproduced on Chrome 5.0.375.99 and Safari 4.0.3. Worksforme in Firefox 4.0b1. Works in Opera 10.53 as well, though the line height is rather borked. (All on Mac OS X 10.6.)

For what it's worth, I've been seeing a handful of goofy visual editor issues in Chrome 5.x while composing posts lately (on numerous different blogs from self-hosted, to dot com, to dot org). Not to the point where I'm avoiding Chrome 5.x, but I've had to refresh the screen here and there without saving my changes to prevent content destruction.

#7 @nacin
15 years ago

  • Severity changed from critical to major
  • Summary changed from HTML code dissapears when switching to visual editor to HTML->Visual editor issues in Webkit browsers

#8 follow-up: @filosofo
15 years ago

I can reproduce with Chrome 5.0.375.99 beta on Linux, so I'm guessing it's not OS-specific.

#9 in reply to: ↑ 8 @Arlen22
15 years ago

Replying to filosofo:

I can reproduce with Chrome 5.0.375.99 beta on Linux, so I'm guessing it's not OS-specific.

Also 5.0.375.75 on windows.

#10 @jshreve
15 years ago

I'm running the chrome dev branch so I can reproduce on 6.0.458.1 dev. The same issue is on Safari Version 3.2.3 on Windows. (It's out of date, I never use Safari on here).

That said - I think it's a problem with Webkit and the code being used in the switch over.

#11 follow-up: @jshreve
15 years ago

I was curious about this. For what it's worth:

Upgrading TinyMCE fixes this. I tested with 3.3.8.

Obviously it needs to be tested more so nothing else breaks. But throughout the many versions released since 3.2.7 it seems they have changed formatting engines and fixed many browser quirks in the process. (http://tinymce.moxiecode.com/js/tinymce/changelog.txt).

Alright, I'm back to work now

#12 in reply to: ↑ 11 ; follow-up: @azaozz
15 years ago

  • Milestone changed from Awaiting Review to 3.1
  • Severity changed from major to normal
  • Version changed from 3.0 to 2.9

Confirmed in Chrome 5.0.375.99 on Windows too. The list (<ul><li>) has nothing to do with this problem. It looks like WebKit is chocking on anchors that also have href attribute. So <a name="whatever"></a> and <a name="whatever">Something</a> work as expected but <a name="whatever" href="whatever.html">Something</a> does not.

Replying to jshreve:

Upgrading TinyMCE fixes this. I tested with 3.3.8.

I've tested that too but this seems to still happen occasionally there (at least in Chrome 5.0 for Windows) and the anchor mini-icon overlaps the anchor text http://tinymce.moxiecode.com/examples/example_01.php

In any case this is not a WordPress bug and will most likely be fixed together with other edge cases in the latest browsers when we update TinyMCE. I'll report it upstream to the TinyMCE developers.

#13 @Arlen22
14 years ago

  • Version changed from 2.9 to 3.0

It only happens if the name attribute is there.

#14 @Arlen22
14 years ago

  • Cc Arlen22 added

#15 in reply to: ↑ 12 @Arlen22
14 years ago

Replying to azaozz:

Confirmed in Chrome 5.0.375.99 on Windows too. The list (<ul><li>) has nothing to do with this problem. It looks like WebKit is chocking on anchors that also have href attribute. So <a name="whatever"></a> and <a name="whatever">Something</a> work as expected but <a name="whatever" href="whatever.html">Something</a> does not.

For me, all three of them change to the anchor icon, but <a href="http://example.com/">example.com</a> works as expected. This is in Chrome version 5.0.375.125 on Windows XP with WP 3.0.1. Fresh install, only Members and WordPress Importers plugins installed.

#16 follow-up: @ocean90
14 years ago

  • Keywords reporter-feedback added

It works with Chrome 7.0.544.0 and Safari 5.0.2 on Windows. Fixed with [15683]?

#17 in reply to: ↑ 16 @demetris
14 years ago

  • Resolution set to fixed
  • Status changed from new to closed

Replying to ocean90:

It works with Chrome 7.0.544.0 and Safari 5.0.2 on Windows. Fixed with [15683]?

Seems so. I checked with current trunk in Safari 5 and in Chrome 9, and I cannot reproduce.

Closing as fixed accordingly.

Note: See TracTickets for help on using tickets.