Opened 4 years ago

Closed 4 years ago

#18329 closed defect (worksforme)

Cannot read property 'parentNode' of null in SwapView.js

Reported by: happyfish Owned by: Adrian Vasiliu
Priority: high Milestone: 1.11
Component: DojoX Mobile Version: 1.10.1
Keywords: Cc:
Blocked By: Blocking:

Description

SwapView?.js:303 Uncaught TypeError?: Cannot read property 'parentNode' of null

Happens when you have two or more swap views inside a parent scrollable view. Once any kind of scroll has been initialized, the aforementioned error fires on every transition in the application.

Attachments (1)

test_SwapView-demo-adrian.html (8.6 KB) - added by Adrian Vasiliu 4 years ago.
Test with 2 SwapView? in ScrollableView?

Download all attachments as: .zip

Change History (7)

comment:1 Changed 4 years ago by happyfish

The problematic line is the following

var parent = this.domNode.parentNode;

I suggest checking for a domNode, like so:

var parent = this.domNode && this.domNode.parentNode;

This fixes the problem on my end and doesn't seem to break anything else.

comment:2 Changed 4 years ago by dylan

Milestone: tbd1.11
Owner: set to Patrick Ruzand
Priority: undecidedhigh
Status: newassigned

comment:3 Changed 4 years ago by Adrian Vasiliu

Owner: changed from Patrick Ruzand to Adrian Vasiliu

Changed 4 years ago by Adrian Vasiliu

Test with 2 SwapView? in ScrollableView?

comment:4 Changed 4 years ago by Adrian Vasiliu

I've attached https://bugs.dojotoolkit.org/attachment/ticket/18329/test_SwapView-demo-adrian.html which contains 2 SwapView? in a ScrollableView?, and tried to reproduce with Dojo 1.10.1 on a couple of desktop browsers: Chrome 38, FF 33, IE11 on Win7. I do not reproduce.

You did not mention the browser nor the OS. Given that I don't reproduce, we would also need a runnable test file to reproduce (possibly by modifying my test file).

Last edited 4 years ago by Adrian Vasiliu (previous) (diff)

comment:5 Changed 4 years ago by Adrian Vasiliu

We are still awaiting for the requested information.

comment:6 Changed 4 years ago by dylan

Resolution: worksforme
Status: assignedclosed
Note: See TracTickets for help on using tickets.