Bug 56053 - Deleting content directly following a button inserts an unnecessary placeholder
Summary: Deleting content directly following a button inserts an unnecessary placeholder
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Levi Weintraub
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-09 14:43 PST by Levi Weintraub
Modified: 2011-03-14 14:19 PDT (History)
6 users (show)

See Also:


Attachments
Patch (4.24 KB, patch)
2011-03-09 16:08 PST, Levi Weintraub
rniwa: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Levi Weintraub 2011-03-09 14:43:27 PST
See attachment.

Deleting any content directly following a button adds a br "placeholder" to the DOM, which is unexpected. Simply place the caret after the space following the button and hit backspace to repro.
Comment 1 Levi Weintraub 2011-03-09 16:08:29 PST
Created attachment 85253 [details]
Patch
Comment 2 Ryosuke Niwa 2011-03-14 11:31:12 PDT
Comment on attachment 85253 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=85253&action=review

looks sane to me.

> LayoutTests/editing/deleting/delete-inserts-br-after-button.html:9
> +target = document.getElementById("container");

Nit: Missing "var".

> LayoutTests/editing/deleting/delete-inserts-br-after-button.html:11
> +window.getSelection().modify("move", "Right", "character");

Nit: Capitalize / de-capitalize all words here (make them consistent).
Comment 3 Levi Weintraub 2011-03-14 12:35:55 PDT
(In reply to comment #2)
> (From update of attachment 85253 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=85253&action=review
> 
> looks sane to me.
> 
> > LayoutTests/editing/deleting/delete-inserts-br-after-button.html:9
> > +target = document.getElementById("container");
> 
> Nit: Missing "var".
> 
> > LayoutTests/editing/deleting/delete-inserts-br-after-button.html:11
> > +window.getSelection().modify("move", "Right", "character");
> 
> Nit: Capitalize / de-capitalize all words here (make them consistent).

Thanks for the review! I'll fix those and land :)
Comment 4 Levi Weintraub 2011-03-14 14:19:46 PDT
Committed r81056: <http://trac.webkit.org/changeset/81056>