Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#14172 closed defect (wontfix)

Opening a combo box's selection list throws "this.store is undefined error"

Reported by: Paul Christopher Owned by: Douglas Hays
Priority: high Milestone: tbd
Component: DojoX Mobile Version: 1.7.0
Keywords: Cc:
Blocked By: Blocking:

Description

Description:

Putting the <datalist>-element right underneath the related input element, as shown by the w3c best-pratice examples (see http://www.w3schools.com/html5/tag_datalist.asp), gives a "this.store is undefined error" in dojox.mobile 1.7-rc1.

Steps to reproduce:

Open dojox/mobile/tests/test_FormControls.html. Change the code structure from

<body>
<datalist>
...
</datalist>
<div dojoType="dojox.mobile.View" selected="true">
 ...
 <input type="text" dojoType="dojox.mobile.ComboBox" data-dojo-props='value:"", list:"states"'>
</div>
</body>

to

<body>
<div dojoType="dojox.mobile.View" selected="true">
 ...
 <input type="text" dojoType="dojox.mobile.ComboBox" data-dojo-props='value:"", list:"states"'>
 <datalist>
   <select dojoType="dijit.form.DataList" data-dojo-props='id:"states"' >
   ...
 </datalist>
</div>
</body>

i.e. move the <datalist>-element right underneath the input element. This will trigger a Javascript error "this.store is undefined".

Test environement:

Firefox 7, dojo1.7-rc1

Why is it a bug?

If you have more complex forms with several combo boxes (or even worse: several views with mutiple combo boxes in one and the same html page), you don't want to move all the datalist entries to the top of the body element outside all view divs. For a better readability of the code, you would rather want to put the related datalist element right underneath the related input element, as suggested by the w3c.

Change History (3)

comment:1 Changed 8 years ago by ykami

Owner: changed from ykami to Douglas Hays

Doug, please take a look.

comment:2 Changed 8 years ago by Douglas Hays

Resolution: wontfix
Status: newclosed

The DataList? widget is not different than other stores that must be defined prior to being used by ComboBox?. Also, the w3c spec doesn't say the DATALIST should be just after the INPUT. Since it can be anywhere on the page, it doesn't seem too unreasonable to put it just before the INPUT. I think this would be risky to fix and the workaround is nearly painless, but patches are always welcome. For good measure, the dojox.mobile.ComboBox? doc on dojocampus has a note that says DataList? must be before the ComboBox?.

comment:3 Changed 8 years ago by Adam Peller

Milestone: 1.7.1tbd
Note: See TracTickets for help on using tickets.