Opened 13 years ago

Closed 12 years ago

Last modified 9 years ago

#2923 closed defect (duplicate)

Issues with Combobox and empty option tag

Reported by: guest Owned by: haysmark
Priority: high Milestone: 0.9beta
Component: Dijit - Form Version: 0.4.2
Keywords: Cc:
Blocked By: Blocking:

Description

Hi! I had two issues with the combobox. The combobox was defined like this one:

<select dojoType="ComboBox?" name="idFrom" size="1" maxListLength="10">

<option></option>

<option>ABC</option>

....

</select>

There is an empty combobox-entry as first element.

1.: Once you select a non empty item you can't return to the empty item.

I fixed it for myself like this:

In Combobox.js

_selectOption: function(/*Event*/ evt){

(.....)

while((tgt.nodeType!=1)
(!tgt.getAttributeNode("resultName"))){

tgt = tgt.parentNode; if(tgt === dojo.body()){

return false;

}

} (.....)

Second issue is only in Firefox: Because the first entry is empty Firefox does not calculate the size of the popup container correct. Funny enough it works when you open the combobox the second time. I don't know why FireFox? is irritated the first time the combobox is opened?!?!

My private fix for this was:

_showResultList: function(){

(......)

show it first to get the correct dojo.style.getOuterHeight(childs[0])<br>

height = visibleCount * dojo.html.getMarginBox(childs[1]).height +"px";

(......)

Regards, Jochen Zimmermann

Change History (3)

comment:1 Changed 12 years ago by Douglas Hays

Component: GeneralDijit
Milestone: 0.9beta
Owner: changed from anonymous to haysmark

comment:2 Changed 12 years ago by haysmark

Resolution: duplicate
Status: newclosed

Duplicate of #2670.

comment:3 Changed 9 years ago by bill

Component: DijitDijit - Form
Note: See TracTickets for help on using tickets.