This is an automated email from the ASF dual-hosted git repository.

aharui pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git


The following commit(s) were added to refs/heads/develop by this push:
     new 580fea4  handle background with only a color specified.  Fixes #449
580fea4 is described below

commit 580fea4fc087e218b1e76957dd9b74e8b0700d6b
Author: Alex Harui <[email protected]>
AuthorDate: Fri Aug 16 09:44:52 2019 -0700

    handle background with only a color specified.  Fixes #449
---
 .../Core/src/main/royale/org/apache/royale/core/SimpleCSSValuesImpl.as | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/frameworks/projects/Core/src/main/royale/org/apache/royale/core/SimpleCSSValuesImpl.as
 
b/frameworks/projects/Core/src/main/royale/org/apache/royale/core/SimpleCSSValuesImpl.as
index 5143c4e..50ef164 100644
--- 
a/frameworks/projects/Core/src/main/royale/org/apache/royale/core/SimpleCSSValuesImpl.as
+++ 
b/frameworks/projects/Core/src/main/royale/org/apache/royale/core/SimpleCSSValuesImpl.as
@@ -816,6 +816,7 @@ package org.apache.royale.core
          */
         COMPILE::JS
         private static const _colorStyles:Object = {
+            'background' : 1, // if only a color is specified, otherwise value 
will be a string
             'backgroundColor': 1,
             'borderColor': 1,
             'color': 1
@@ -884,7 +885,7 @@ package org.apache.royale.core
                     else
                         value = value.toString() + 'px';
                 }
-                else if (p == 'backgroundImage' && p.indexOf('url') != 0) {
+                else if (p == 'backgroundImage' && value.indexOf('url') != 0) {
                         value = 'url(' + value + ')';
                 }
                 (thisObject.element as HTMLElement).style[p] = value;

Reply via email to