Opened 6 years ago
Closed 5 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)
Change History (7)
comment:1 Changed 6 years ago by
comment:2 Changed 6 years ago by
Milestone: | tbd → 1.11 |
---|---|
Owner: | set to Patrick Ruzand |
Priority: | undecided → high |
Status: | new → assigned |
comment:3 Changed 6 years ago by
Owner: | changed from Patrick Ruzand to Adrian Vasiliu |
---|
Changed 6 years ago by
Attachment: | test_SwapView-demo-adrian.html added |
---|
Test with 2 SwapView? in ScrollableView?
comment:4 Changed 6 years ago by
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).
comment:6 Changed 5 years ago by
Resolution: | → worksforme |
---|---|
Status: | assigned → closed |
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.