Skip to content

TNS 3.1 breaks background-color through css binding for iOS #4450

@PeterStaev

Description

@PeterStaev

This is regarding the DropDown plugin. In TNS 3.0 binding the value of the class that has some background-color property defined worked flawlessly. Now after I've upgraded the demo project to 3.1 setting the background-color fails with the following error:

CONSOLE ERROR file:///app/tns_modules/tns-core-modules/trace/trace.js:165:30: Error: Failed to apply property [background-color
] with value [blue] to DropDown<dd>@file:///app/main-page.xml:3:5;. TypeError: value1.equals is not a function. (In 'value1.equ
als(value2)', 'value1.equals' is undefined)

After debugging the issue turns out that here:

let prev = this[computedValue];
the oldValue ends up an instance of UIColor instead of Color and thus the comparison is failing. I have not made any changes to the styling so it must be some of the changes to the TNS core that is messing up the value. In addition testing the same demo app with TNS 3.0 oldValue ends up correctly as an instance of Color

The issue can be easily simulated by using the demo project for the drop down and upgrading it to 3.1 and pressing Change Styles button once it runs.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions