Opened 5 years ago

Last modified 20 months ago

#17983 new defect

ItemFileReadStore.js (IE8)

Reported by: aleung Owned by: aleung
Priority: undecided Milestone: 1.14
Component: Data Version: 1.9.3
Keywords: Cc:
Blocked By: Blocking:

Description

Failed on line 564 (uncompressed file), IE8 array count is off by 1 because of the prototype attribute. A quick fix is to add check 'if (this._arrayOfTopLevelItems[i] === undefined) break;' within the for loop line 557 to 565.

Attachments (4)

dojo_bug1_screen1.png (46.2 KB) - added by aleung 5 years ago.
dojo_bug1_screen2.png (46.0 KB) - added by aleung 5 years ago.
itemFileReadStore.html (3.7 KB) - added by aleung 5 years ago.
itemFileReadStore.2.html (3.7 KB) - added by aleung 5 years ago.
test case

Download all attachments as: .zip

Change History (11)

comment:1 Changed 5 years ago by bill

Owner: set to aleung
Status: newpending

Can you attach a test case?

comment:2 Changed 5 years ago by aleung

Status: pendingnew

This seems to be cause by an IE8 bug. If the storage is explicitly define as array, then the code will work. If leave it up to IE8, then array length is off by one. IE9 or above does not have the issue.

Does the assumption of array index is always a number correct? I will work on the example.

Last edited 5 years ago by aleung (previous) (diff)

Changed 5 years ago by aleung

Attachment: dojo_bug1_screen1.png added

Changed 5 years ago by aleung

Attachment: dojo_bug1_screen2.png added

comment:3 Changed 5 years ago by aleung

I attached two screen captures

The first one shows variable test created as an array. Variable test1 created from code similar to dojo example. The variable data is from my code created by program. Notice the type different for test1.items "[ [object Object],[object Object]]" and data.items "[object(Array)]". The second screen captures show unrolling data.items. Items enumerated to 106 and length show 108.

comment:4 Changed 5 years ago by bill

Status: newpending

OK, but can you attach a test case?

Changed 5 years ago by aleung

Attachment: itemFileReadStore.html added

comment:5 Changed 5 years ago by aleung

Status: pendingnew

Attachment (itemFileReadStore.html) added by ticket reporter.

Changed 5 years ago by aleung

Attachment: itemFileReadStore.2.html added

test case

comment:6 Changed 3 years ago by dylan

Milestone: tbd1.12

comment:7 Changed 20 months ago by dylan

Milestone: 1.131.14
Note: See TracTickets for help on using tickets.