Open Bug 401800 Opened 13 years ago

Midas - Unable to justify divs

Categories

(Core :: DOM: Editor, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

UNCONFIRMED

People

(Reporter: jparent+mozilla, Unassigned)

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.8) Gecko/20071008 Firefox/2.0.0.8
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.8) Gecko/20071008 Firefox/2.0.0.8

execCommand justifyRight|justifyCenter|justifyLeft does not justify if multiple divs are selected, but instead removes all the divs and inserts br's in their place (and does not do any justification). Aka, "<div>foo</div><div>bar</div>" --> "foo<br>bar".
The same command on p's works fine.  A single div works fine.

Reproducible: Always

Steps to Reproduce:
1. Go to midas demo
2. Go to html source view and enter "<div>foo</div><div>bar</div>"
3. Go to normal edit view
4. Select all
5. Click right align on the toolbar.

Actual Results:  
No visible alignment is done, and if you view the underlying html it has been changed to "foo<br>bar"

Expected Results:  
Text looks aligned right and underlying html is either
1. "<div style="text-align: right;">foo</div><div style="text-align: right;">bar</div>"
2. "<div align="right">foo</div><div align="right">bar</div>"
depending on if useCss is set.
You need to log in before you can comment on or make changes to this bug.