зеркало из https://github.com/mozilla/pjs.git
Bug 291780 - List outdent is not working properly; r=ehsan
This commit is contained in:
Родитель
af047ec136
Коммит
d14a08954f
|
@ -4051,7 +4051,7 @@ nsHTMLEditRules::WillOutdent(nsISelection *aSelection, PRBool *aCancel, PRBool *
|
|||
if (nsHTMLEditUtils::IsListItem(curNode))
|
||||
{
|
||||
// if it is a list item, that means we are not outdenting whole list.
|
||||
// So we need to finish up dealng with any curBlockQuote, and then
|
||||
// So we need to finish up dealing with any curBlockQuote, and then
|
||||
// pop this list item.
|
||||
if (curBlockQuote)
|
||||
{
|
||||
|
@ -4123,7 +4123,7 @@ nsHTMLEditRules::WillOutdent(nsISelection *aSelection, PRBool *aCancel, PRBool *
|
|||
float f;
|
||||
nsCOMPtr<nsIAtom> unit;
|
||||
mHTMLEditor->mHTMLCSSUtils->ParseLength(value, &f, getter_AddRefs(unit));
|
||||
if (f > 0)
|
||||
if (f > 0 && !(nsHTMLEditUtils::IsList(curParent) && nsHTMLEditUtils::IsList(curNode)))
|
||||
{
|
||||
curBlockQuote = n;
|
||||
firstBQChild = curNode;
|
||||
|
|
|
@ -38,7 +38,7 @@ addLoadEvent(function() {
|
|||
var expected = '<ul style="margin-left: 40px;"><li>Item 1</li><ul><li>Item 2</li><li>Item 3</li></ul><li>Item 4</li></ul>';
|
||||
is(editor.innerHTML, expected, "indenting part of an already indented bulleted list");
|
||||
document.execCommand("outdent", false, false);
|
||||
todo_is(editor.innerHTML, original, "outdenting the partially indented part of an already indented bulleted list");
|
||||
is(editor.innerHTML, original, "outdenting the partially indented part of an already indented bulleted list");
|
||||
|
||||
// done
|
||||
SimpleTest.finish();
|
||||
|
|
Загрузка…
Ссылка в новой задаче