diff --git a/editor/ui/dialogs/content/EdAECSSAttributes.js b/editor/ui/dialogs/content/EdAECSSAttributes.js index eefd67ab4d1..b545dc0082e 100644 --- a/editor/ui/dialogs/content/EdAECSSAttributes.js +++ b/editor/ui/dialogs/content/EdAECSSAttributes.js @@ -56,7 +56,6 @@ function BuildCSSAttributeTable() ClearCSSInputWidgets(); } -// add or select attribute in the tree widget function onChangeCSSAttribute() { var name = TrimString(gDialog.AddCSSAttributeNameInput.value); @@ -67,7 +66,7 @@ function onChangeCSSAttribute() // First try to update existing attribute // If not found, add new attribute - if ( !UpdateExistingAttribute( name, value, "CSSAList" ) ) + if ( !UpdateExistingAttribute( name, value, "CSSAList" ) && value) AddTreeItem( name, value, "CSSAList", CSSAttrs ); } @@ -104,14 +103,6 @@ function onInputCSSAttributeName() gDialog.AddCSSAttributeValueInput.value = newValue; } -function onInputCSSAttributeValue() -{ - // Update value in the tree list - UpdateExistingAttribute( gDialog.AddCSSAttributeNameInput.value, - gDialog.AddCSSAttributeValueInput.value, - "CSSAList" ); -} - function editCSSAttributeValue(targetCell) { if (IsNotTreeHeader(targetCell)) diff --git a/editor/ui/dialogs/content/EdAEJSEAttributes.js b/editor/ui/dialogs/content/EdAEJSEAttributes.js index 7c84294e37a..bf4130d7a0f 100644 --- a/editor/ui/dialogs/content/EdAEJSEAttributes.js +++ b/editor/ui/dialogs/content/EdAEJSEAttributes.js @@ -163,7 +163,7 @@ function onInputJSEAttributeValue() // Update value in the tree list // Since we have a non-editable menulist, // we MUST automatically add the event attribute if it doesn't exist - if (!UpdateExistingAttribute( name, value, "JSEAList" )) + if (!UpdateExistingAttribute( name, value, "JSEAList" ) && value) AddTreeItem( name, value, "JSEAList", JSEAttrs ); } } diff --git a/editor/ui/dialogs/content/EdAdvancedEdit.xul b/editor/ui/dialogs/content/EdAdvancedEdit.xul index f17aa62996b..44682b08456 100644 --- a/editor/ui/dialogs/content/EdAdvancedEdit.xul +++ b/editor/ui/dialogs/content/EdAdvancedEdit.xul @@ -167,7 +167,7 @@ oninput="onInputCSSAttributeName();" onchange="onChangeCSSAttribute();"/> + oninput="onChangeCSSAttribute();"/>