Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-14295] Mobileweb: properties set to "null" are assigned as "undefined" on proxy objects

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionWon't Fix
Resolution Date2017-06-26T19:10:12.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsMobileWeb
Labelsparity
ReporterTony Lukasavage
AssigneeChris Barber
Created2013-06-19T19:35:01.000+0000
Updated2018-04-04T23:20:41.000+0000

Description

problem

On Mobileweb, if I assign null to a proxy property and then attempt to access that property, it will return undefined. This is a parity issue as under the same circumstances iOS and Android will return null. This was uncovered during Alloy unit testing of adding/removing style classes on proxy objects.

expected

When a Titanium proxy object is assigned a property with the value of null, accessing that property should also return null, not undefined.

test case

var win = Ti.UI.createWindow({
	backgroundColor: '#fff',
	fullscreen: false,
	exitOnClose: true,
	top: null
});
win.open();

Ti.API.info(JSON.stringify(win.top));

output

iOS 6.1 iPhone sim

[INFO]  null

Android 2.3.3 HVGA emulator

I/TiAPI   (  678):  null

Mobileweb + chrome

[INFO] undefined

Comments

  1. Lee Morris 2017-06-26

    Marking ticket as "Won't Fix" as MobileWeb has been deprecated.
  2. Eric Merriman 2018-04-04

    Closing as will not fix.

JSON Source