Open Bug 454373 Opened 16 years ago Updated 2 years ago

queryCommandState (' bold / italic ') when styleWithCss is true does not return true when selection is collapsed on a BR tag inside a tag with style="font-weight: bold/font-style: italic"

Categories

(Core :: DOM: Editor, defect)

defect

Tracking

()

UNCONFIRMED

People

(Reporter: dpopa, Unassigned)

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.2pre) Gecko/2008081205 GranParadiso/3.0.2pre
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.2pre) Gecko/2008081205 GranParadiso/3.0.2pre

queryCommandState ('bold/italic') when styleWithCss is true does not return true when selection is collapsed on a BR tag inside a tag with style="font-weight: bold/font-style: italic".

It returns true when selection is not collapsed or is collapsed inside a text node inside a styled tag.



Reproducible: Always

Steps to Reproduce:
1. Have this mark-up in a page:
<div contenteditable="true"><span style="font-weight: bold"><br /></span></div>

2. Click inside the editable DIV and check the value of the document.queryCommandState ('bold')

Actual Results:  
false

Expected Results:  
true
Added testcase
Bug #352660 may be a duplicate.

Note that queryCommandState ('bold/italic') when styleWithCss is false reports true for <b><br /></b>.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: