[Dojo-interest] combobox bug using tabs?

Jordi Martí jmarti at theinit.com
Sat Apr 26 12:42:58 UTC 2008


Hi, 

Can anyone tell me if this is a bug and how could it be corrected, if it is
not already? I use dojo version 1.1.0b3

I have a combobox that if it is selected with mouse works ok, but if it is
used with keyboard and tabulator, gives a javascript error.

Javascript error says that dijit.byId("....").item has no values, but if set
with mouse click, it's ok... I think that the method that should set "item"
property is not being called when bluring combobox with tab key.

Here's a page I use to reproduce this "potential" bug. Try to fill the
fields using only keyboard. Doesn't work (item is not set). Do it again with
mouse and click on second field. Item it IS set. ¿?

Thanks everyone.

<html>
<head>
	<title>combobox manual</title>
	<link href="../js/lib/dijit/themes/dijit.css" rel="stylesheet"
type="text/css">
	<link href="../js/lib/dijit/themes/tundra/tundra.css"
rel="stylesheet" type="text/css"><html>
	<script type="text/javascript" src="../js/lib/dojo/dojo.js"
djConfig="parseOnLoad: true"></script>
	<script type="text/javascript">
	<!--
		dojo.require("dojo.data.ItemFileReadStore");		
   		dojo.require("dijit.form.ComboBox");
   		
	function check() {
		alert(dijit.byId("selectCampo").getValue());
		alert(dijit.byId("selectCampo").item.value);

		}
	
	var dir="/a/page/that/gives/an/item/file/read/store.do";
	destinoDataStore = new dojo.data.ItemFileReadStore({url: dir});
	
	//-->
	</script>
</head>
<body class="tundra">
<form action="this.jsp">
<input dojoType="dijit.form.ComboBox" id="selectCampo" searchAttr="label"
ignoreCase="true" autocomplete="true" class="input2"
store="destinoDataStore" />
<input type="hidden" name="codCampo"/>
<br/><br/>
<input type="text" onfocus="check()" size="20"/>
</form>
</body>
</html>


   
 
JORDI MARTÍ 
Email: jmarti AT theinit _dot_ com

 
 
 
PRIVADO Y CONFIDENCIAL
Este mensaje va dirigido a la persona(s) indicada(s). Puede contener
información confidencial de carácter legal o personal de THE INIT SERVICES,
La transmisión errónea del presente mensaje en ningún momento supone
renuncia a su confidencialidad. Si el lector del mensaje no es el
destinatario indicado, o el empleado encargado de su entrega a dicha
persona, por favor, notifíquelo inmediatamente por teléfono y remita el
mensaje original a la dirección de correo electrónico indicada. Cualquier
copia o distribución de esta comunicación queda estrictamente prohibida.


 
 
 
 



More information about the Dojo-interest mailing list