Opened 14 years ago

Closed 14 years ago

Last modified 11 years ago

#4277 closed defect (invalid)

cannot set onfocus event for FilteringSelect widget

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


The following code demonstrates the problem. In ie 7, nothing happens when clicking on the FilterSelect? widget after setting an onfocus event. In firefox, it behaves erratically:



<script type="text/javascript" src="/js_libs/dojo_root/dojo/dojo.js"

djConfig="parseOnLoad: true, isDebug: 'true'"></script>

<script type="text/javascript" src="/js_libs/dojo_root/dijit/dijit.js"></script>

<style type="text/css">

@import "/js_libs/dojo_root/dojo/resources/dojo.css"; @import "/js_libs/dojo_root/dijit/themes/tundra/tundra.css";


<script type="text/javascript">

dojo.require("dojo.parser"); dojo.require("dijit.form.FilteringSelect?");


<script type="text/javascript">

function focus_select() {

dojo.byId("output").innerHTML += "focused select<BR>";


function init() {

elem = dijit.byId('myselect'); dojo.connect(elem, 'onfocus', null, "focus_select");





<body class=tundra>

<select widgetid=myselect name=myselect

dojoType="dijit.form.FilteringSelect?"> <option value=1>1</option> <option value=2>2</option>


<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR> <div type=text id=output></div>



Change History (2)

comment:1 Changed 14 years ago by bill

Resolution: invalid
Status: newclosed

FilteringSelect? doesn't have an onfocus method, so this isn't a bug but rather an ER, I suppose. You should be able to attach to _onFocus to get what you want

<span dojoType=dijit.form.FilteringSelect>
  <script type="dojo/connect" event="_onFocus"> ... </script>

comment:2 Changed 11 years ago by bill

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