Bug 12322

Summary: Adjacent, identical spans should merge into one span
Product: WebKit Reporter: Dan Wood <dwood>
Component: HTML EditingAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: ayg
Priority: P2    
Version: 420+   
Hardware: Mac   
OS: OS X 10.4   

Description Dan Wood 2007-01-18 12:46:46 PST
To reproduce:

0. Launch Blot_editableDiv_showSource, my modified version of "Blot" available from <http://dan.karelia.com/webkit/Blot_editableDiv_showSource.zip> with DYLD_FRAMEWORK_PATH pointing to TOT.  (I'm using r18941)

1. Click on the editable top panel
2. Type some text like "Hello webkats and webkittens"
3. Select the words "webkats", "webkittens" and make bold
4. Backspace out the "and" (with the surrounding spaces) so that "webkats" is directly adjacent to "webkittens"

Results:  Markup is Hello <span class="Apple-style-span" style="font-weight: bold;">webkats</span><span class="Apple-style-span" style="font-weight: bold;">webkittens</span>

Expected: The two identical spans should merge together so that it would look something like this:
Hello <span class="Apple-style-span" style="font-weight: bold;">webkatswebkittens</span>
Comment 1 Dave 2007-11-27 06:24:30 PST
in fact the output shouldn't contain ANY custom apple span classes.
i know no other browser thats "spamming" form outputs with custom tags!?! this is very harmful when using web-editors like for example used in content management systems.
Comment 2 Aryeh Gregor 2011-08-22 12:19:12 PDT
I filed a bug against the editing specification:

http://www.w3.org/Bugs/Public/show_bug.cgi?id=13839