mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 00:01:50 +00:00
Fixed busted HTML attribute setting in Composer Advanced Edit dialog, b=106047, r=brade, sr=hewitt
This commit is contained in:
parent
4965e9aa2c
commit
172a3a201e
@ -147,8 +147,8 @@ function onChangeHTMLAttribute()
|
||||
|
||||
// First try to update existing attribute
|
||||
// If not found, add new attribute
|
||||
if ( !UpdateExistingAttribute( name, value, "HTMLAList" ) && value)
|
||||
AddTreeItem ( name, value, "HTMLAList", HTMLAttrs );
|
||||
if (!UpdateExistingAttribute( name, value, "HTMLAList" ) && value)
|
||||
AddTreeItem (name, value, "HTMLAList", HTMLAttrs);
|
||||
}
|
||||
|
||||
function ClearHTMLInputWidgets()
|
||||
@ -279,6 +279,10 @@ function onInputHTMLAttributeValue()
|
||||
if (!gUpdateTreeValue)
|
||||
return;
|
||||
|
||||
var name = TrimString(gDialog.AddHTMLAttributeNameInput.value);
|
||||
if (!name)
|
||||
return;
|
||||
|
||||
// Trim spaces only from left since we must allow spaces within the string
|
||||
// (we always reset the input field's value below)
|
||||
var value = TrimStringLeft(gDialog.AddHTMLAttributeValueInput.value);
|
||||
@ -330,8 +334,10 @@ function onInputHTMLAttributeValue()
|
||||
}
|
||||
}
|
||||
|
||||
// Always update value in the tree list
|
||||
UpdateExistingAttribute(gDialog.AddHTMLAttributeNameInput.value, value, "HTMLAList");
|
||||
// Update value in the tree list
|
||||
// If not found, add new attribute
|
||||
if ( !UpdateExistingAttribute(name, value, "HTMLAList" ) && value)
|
||||
AddTreeItem(name, value, "HTMLAList", HTMLAttrs);
|
||||
}
|
||||
|
||||
function editHTMLAttributeValue(targetCell)
|
||||
|
Loading…
Reference in New Issue
Block a user