Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#16396 closed defect (fixed)

getParent() sometimes returns null on iOS6 mobile devices

Reported by: Eric Durocher Owned by: bill
Priority: undecided Milestone: 1.8.2
Component: Dijit Version: 1.8.1
Keywords: Cc: cjolif
Blocked By: Blocking:

Description

This problem has initially been seen on a dojox/mobile/ListItem, as described in #16199. This first ticket was fixed by overriding getParent() locally in ListItem. However, the same problem has been reported on a SpinWheel widget, so it seems the bug can potentially occur in any other code that uses getParent(), and it would be better to fix this directly in dijit.

Change History (6)

comment:1 Changed 7 years ago by cjolif

Cc: cjolif added

comment:2 Changed 7 years ago by bill

Hmm, can you come up with a simpler test case than the todoApp?

I don't even understand how your overridden getParent() is different than the normal one.

comment:3 Changed 7 years ago by cjolif

It is not different. This is apparently a iOS JavaScript? VM bug that happens to not happen if we duplicate the !getParent code another place. As often with a VM bug it only happens in complex cases, not simple example. TodoApp? was one of them but we had other ones with customer code we can't share here.

Version 0, edited 7 years ago by cjolif (next)

comment:4 Changed 7 years ago by bill

Milestone: tbd1.8.2
Status: newassigned

Dave Clark writes:

I would strongly suggest considering replacing

node.getAttribute && node.getAttribute("widgetId");

with

(node.nodeType == 1) && node.getAttribute("widgetId");

in registry.js [getEnclosingWidget()].

Since that (for some reason) solves the iOS6 problem, and makes the registry.getEnclosingWidget() code consistent with how the parser loops, I'm fine with the change.

comment:5 Changed 7 years ago by bill

Resolution: fixed
Status: assignedclosed

In [30061]:

Change getEnclosingWidget() looping code to avoid iOS6 bug and to be consistent with how parser loops, fixes #16396 on trunk

comment:6 Changed 7 years ago by bill

In [30062]:

Change getEnclosingWidget() looping code to avoid iOS6 bug and to be consistent with how parser loops, fixes #16396 on 1.8 branch

Note: See TracTickets for help on using tickets.