Closed Bug 316447 Opened 19 years ago Closed 12 years ago

inserting an horizontal rule <HR> sets size="2" width="100%"

Categories

(Core :: DOM: Editor, defect)

defect
Not set
minor

Tracking

()

RESOLVED FIXED
mozilla14

People

(Reporter: amla70, Assigned: ayg)

Details

Attachments

(1 file)

Using the Insert Horizontal rule command in Thunderbird or in a Midas editor  inserts <hr size="2" width="100%"> instead of just inserting <hr>
QA Contact: editor
Assignee: mozeditor → nobody
Test:

data:text/html,<!doctype html>
<div contenteditable>foo</div>
<script>
getSelection().selectAllChildren(document.body.firstChild);
document.execCommand("insertHorizontalRule");
document.body.textContent =
document.body.firstChild.innerHTML;
</script>

Result is

  <hr style="width: 100%; height: 2px;">

Should be

  <hr>

Confirmed in a mozilla-central build.
Assignee: nobody → ayg
Status: NEW → ASSIGNED
Attached patch Patch v1Splinter Review
AFAICT, the attributes were useless anyway, because that's the default height/width for an <hr>.
Attachment #612142 - Flags: review?(ehsan)
Whiteboard: [autoland-try:-u all]
Whiteboard: [autoland-try:-u all] → [autoland-in-queue]
Comment on attachment 612142 [details] [diff] [review]
Patch v1

Review of attachment 612142 [details] [diff] [review]:
-----------------------------------------------------------------

I think the original plan was to make these values customizable via prefs, but I don't think we want to do that!
Attachment #612142 - Flags: review?(ehsan) → review+
Whiteboard: [autoland-in-queue] → [autoland-try:-u all]
Whiteboard: [autoland-try:-u all]
Autoland Patchset:
	Patches: 612142
	Branch: mozilla-central => try
	Destination: http://hg.mozilla.org/try/pushloghtml?changeset=0c0a0a7cd903
Try run started, revision 0c0a0a7cd903. To cancel or monitor the job, see: https://tbpl.mozilla.org/?tree=Try&rev=0c0a0a7cd903
Try run for 0c0a0a7cd903 is complete.
Detailed breakdown of the results available here:
    https://tbpl.mozilla.org/?tree=Try&rev=0c0a0a7cd903
Results (out of 219 total builds):
    success: 181
    warnings: 35
    other: 3
Builds (or logs if builds failed) available at:
http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/autolanduser@mozilla.com-0c0a0a7cd903
https://hg.mozilla.org/integration/mozilla-inbound/rev/ad9d219c1855
Severity: normal → minor
Flags: in-testsuite+
OS: Windows XP → All
Hardware: x86 → All
Target Milestone: --- → mozilla14
https://hg.mozilla.org/mozilla-central/rev/ad9d219c1855
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: