#16656 closed defect (fixed)
dojox/mvc/StoreRefController is not working on Android 3.x
Reported by: | cjolif | Owned by: | Ed Chatelain |
---|---|---|---|
Priority: | undecided | Milestone: | 1.9 |
Component: | DojoX MVC | Version: | 1.8.3 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description (last modified by )
Run the following code on Android 3.x (at least Samsung Galaxy Tab 10.1 tablet):
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-type" content="text/html; charset=utf-8"> <script type="text/javascript"> dojoConfig = { isDebug: 1, parseOnLoad: 0, async: 1, mvc: {debugBindings: 1} }; </script> <script type="text/javascript" src="../../../dojo/dojo.js"></script> <script> require(["dojox/mvc/StoreRefListController", "dojo/store/DataStore", "dojo/data/ItemFileWriteStore"], function(StoreRefListController, DataStore, ItemFileWriteStore){ var ctrl = new StoreRefListController({store: new DataStore({store: new ItemFileWriteStore({url: "lists.json"})})}); ctrl.queryStore(); }); </script> <script type="text/javascript"> </script> </head> <body> </body> </html>
You will get an exception.
This seems to be coming from the fact StoreRefController is adding new properties on a Deferred promise while the promise has been frozen (Object.freeze). Other browsers seems not enforce that but Android 3.x does.
Attachments (1)
Change History (10)
comment:1 Changed 8 years ago by
Description: | modified (diff) |
---|
comment:2 Changed 8 years ago by
Owner: | changed from Ed Chatelain to cjolif |
---|---|
Status: | new → assigned |
comment:3 Changed 8 years ago by
Description: | modified (diff) |
---|
comment:4 Changed 8 years ago by
Owner: | changed from cjolif to Ed Chatelain |
---|
comment:5 Changed 8 years ago by
comment:6 Changed 8 years ago by
Sorry for the typo. I only have one Android 3 device (the one listed above), so maybe this is specific to this one. I say this is coming from the frozen objects for two reasons:
- because a TypeError: object is immutable error is indeed shown in the console (and this happens in StoreRefController.queryStore when we copy new properties into the promise)
- and because if I change Deferred code to not freeze the promise I don't have anymore the problem ;)
comment:9 Changed 8 years ago by
Milestone: | tbd → 1.9 |
---|
Note: See
TracTickets for help on using
tickets.
IIRC module named dojox/mvc/StoreRefListController does not exist... So tried slightly modified HTML like below:
And got the following (without an error) with Android 3.0 browser:
I haven't worked much with Android, so wondering why you thought it's an issue with accessing frozen object? Was it from console or something?